diff options
author | Matthew Waters <matthew@centricular.com> | 2020-06-25 09:30:28 +0300 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2020-09-21 05:08:14 +0300 |
commit | 2b9c465643bdaa1cb4258fd0dde7f42f0e88acfb (patch) | |
tree | 53d66fcb923d6c3e9dd01553e4cdc3dd571c03ac /gst | |
parent | 64e89e43aa348194c025780a0593982ba8aa000b (diff) |
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>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/isomp4/qtdemux.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gst/isomp4/qtdemux.c b/gst/isomp4/qtdemux.c index 146f409cb..f719617c0 100644 --- a/gst/isomp4/qtdemux.c +++ b/gst/isomp4/qtdemux.c @@ -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; |