Commit eebc4c00 authored by Mark Nauwelaerts's avatar Mark Nauwelaerts

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.
parent 2f8980d7
......@@ -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 %"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment