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.
This commit is contained in:
Mark Nauwelaerts 2017-07-02 11:55:13 +02:00
parent 2f8980d70d
commit eebc4c0022

View file

@ -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 %"