mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
matroskademux: Update duration if current buffer is already after the old duration
This commit is contained in:
parent
c9b1ab53fe
commit
5ca96043ff
1 changed files with 9 additions and 1 deletions
|
@ -4362,9 +4362,17 @@ gst_matroska_demux_parse_blockgroup_or_simpleblock (GstMatroskaDemux * demux,
|
|||
}
|
||||
|
||||
if (!GST_CLOCK_TIME_IS_VALID (demux->segment.last_stop)
|
||||
|| demux->segment.last_stop < lace_time)
|
||||
|| demux->segment.last_stop < lace_time) {
|
||||
demux->segment.last_stop = lace_time;
|
||||
|
||||
if (demux->duration < lace_time) {
|
||||
demux->duration = lace_time;
|
||||
gst_element_post_message (GST_ELEMENT_CAST (demux),
|
||||
gst_message_new_duration (GST_OBJECT_CAST (demux),
|
||||
GST_FORMAT_TIME, GST_CLOCK_TIME_NONE));
|
||||
}
|
||||
}
|
||||
|
||||
if (GST_CLOCK_TIME_IS_VALID (stream->pos)) {
|
||||
GstClockTimeDiff diff = GST_CLOCK_DIFF (stream->pos, lace_time);
|
||||
|
||||
|
|
Loading…
Reference in a new issue