summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Nauwelaerts <mnauw@users.sourceforge.net>2017-07-02 11:55:13 +0200
committerMark Nauwelaerts <mnauw@users.sourceforge.net>2017-07-09 11:06:45 +0200
commiteebc4c002224f4c4c880d49d15ff1ba3ee968882 (patch)
treec19edb738d0d7ca0b3a4895ea65f1bee995f791a
parent2f8980d70d7e56463bcebe46f092648a8231bdbc (diff)
mpegdemux: segment seek flag is not relevant when checking for EOS
It is only relevant in deciding whether or not send SEGMENT_DONE. In this case, not detecting EOS leads to a busy loop when encountering the originally recorded end-of-file of a file that is still growing.
-rw-r--r--gst/mpegdemux/gstmpegdemux.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index c6226544d..44541490d 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -2858,10 +2858,9 @@ gst_ps_demux_loop (GstPad * pad)
offset += size;
gst_segment_set_position (&demux->sink_segment, GST_FORMAT_BYTES, offset);
/* check EOS condition */
- if ((demux->src_segment.flags & GST_SEEK_FLAG_SEGMENT) &&
- ((demux->sink_segment.position >= demux->sink_segment.stop) ||
- (demux->src_segment.stop != (guint64) - 1 &&
- demux->src_segment.position >= demux->src_segment.stop))) {
+ if ((demux->sink_segment.position >= demux->sink_segment.stop) ||
+ (demux->src_segment.stop != (guint64) - 1 &&
+ demux->src_segment.position >= demux->src_segment.stop)) {
GST_DEBUG_OBJECT (demux,
"forward mode using segment reached end of " "segment pos %"
GST_TIME_FORMAT " stop %" GST_TIME_FORMAT " pos in bytes %"