summaryrefslogtreecommitdiffstats
path: root/ext/dv/gstdvdemux.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/dv/gstdvdemux.c')
-rw-r--r--ext/dv/gstdvdemux.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/dv/gstdvdemux.c b/ext/dv/gstdvdemux.c
index 890e65e1..bd2c3ac3 100644
--- a/ext/dv/gstdvdemux.c
+++ b/ext/dv/gstdvdemux.c
@@ -1397,10 +1397,15 @@ gst_dvdemux_demux_frame (GstDVDemux * dvdemux, GstBuffer * buffer)
goto done;
}
- ret = GST_FLOW_OK;
gst_segment_set_last_stop (&dvdemux->time_segment, GST_FORMAT_TIME, next_ts);
dvdemux->frame_offset++;
+ /* check for the end of the segment */
+ if (dvdemux->time_segment.stop != -1 && next_ts > dvdemux->time_segment.stop)
+ ret = GST_FLOW_UNEXPECTED;
+ else
+ ret = GST_FLOW_OK;
+
done:
return ret;