mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
qtdemux: extend edit list when fragmented
When we are fragmented, the edit list may only refer to the portion of the media that is in the moov. Extend the edit list stop time when we if there is only one qt segment and we are reading a fragmented file. Fixes playback of some fragmented mp4 files generated by proprietary programs. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/643>
This commit is contained in:
parent
64e89e43aa
commit
2b9c465643
1 changed files with 4 additions and 1 deletions
|
@ -3129,7 +3129,10 @@ check_update_duration (GstQTDemux * qtdemux, GstClockTime duration)
|
|||
/* internal duration tracking state has been updated above, so */
|
||||
/* preserve an open-ended dummy segment rather than repeatedly updating
|
||||
* it and spamming downstream accordingly with segment events */
|
||||
if (stream->dummy_segment &&
|
||||
/* also mangle the edit list end time when fragmented with a single edit
|
||||
* list that may only cover any non-fragmented data */
|
||||
if ((stream->dummy_segment ||
|
||||
(qtdemux->fragmented && stream->n_segments == 1)) &&
|
||||
GST_CLOCK_TIME_IS_VALID (stream->segments[0].duration)) {
|
||||
/* Update all dummy values to new duration */
|
||||
stream->segments[0].stop_time = duration;
|
||||
|
|
Loading…
Reference in a new issue