[FFmpeg-devel] [PATCH] mov: fix decode of fragments that overlap in time

John Stebbins stebbins at jetheaddev.com
Mon Sep 25 20:52:20 EEST 2017


On 09/25/2017 10:31 AM, wm4 wrote:
> On Mon, 25 Sep 2017 10:10:58 -0700
> John Stebbins <jstebbins at jetheaddev.com> wrote:
>
>> When keyframe intervals of dash segments are not perfectly aligned,
>> fragments in the stream can overlap in time. Append new "trun" index
>> entries to the end of the index instead of sorting by timestamp.
>> Sorting by timestamp causes packets to be read out of decode order and
>> results in decode errors.
>> ---
> Does that mean the demuxed packets will have timestamps going
> backwards or funny issues like this?
>

Yes, the timestamps do go backwards in this scenario.  It's up to the player to either drop frames at the end of the
previous fragment, or decode and then not display the overlapping frames at the start of the fragment.  In a streaming
scenario, you likely have already displayed the end of the previous fragment, so would have to do the latter.

-- 
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170925/390f1c67/attachment.sig>


More information about the ffmpeg-devel mailing list