matroskademux: Mark streams as EOS when outside the requested segment
Ensure that streams with no (more) data are marked as EOS when advancing past the requested segment. Without this change the EOS would be postponed to the end of the file in that case. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/8395>
This commit is contained in:
parent
353d963c77
commit
fa9b630fc8
@ -3695,6 +3695,17 @@ gst_matroska_demux_sync_streams (GstMatroskaDemux * demux)
|
||||
GST_OBJECT_UNLOCK (demux);
|
||||
gst_pad_push_event (context->pad, event);
|
||||
GST_OBJECT_LOCK (demux);
|
||||
|
||||
/* Mark the stream as EOS if synchronization advanced past the requested segment. */
|
||||
if (GST_CLOCK_TIME_IS_VALID (demux->common.segment.stop)
|
||||
&& stop >= demux->common.segment.stop) {
|
||||
GST_DEBUG_OBJECT (demux,
|
||||
"Synchronizing stream %d to %" GST_TIME_FORMAT
|
||||
" put the stream after the segment stop at %" GST_TIME_FORMAT,
|
||||
stream_nr, GST_TIME_ARGS (stop),
|
||||
GST_TIME_ARGS (demux->common.segment.stop));
|
||||
context->eos = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user