[FFmpeg-devel] [mov] Bail when invalid sample data is present.

Dale Curtis dalecurtis at chromium.org
Fri Aug 25 21:59:51 EEST 2017


On Fri, Aug 25, 2017 at 5:43 AM, Michael Niedermayer <michael at niedermayer.cc
> wrote:

>
> This patch breaks:
> http://samples.ffmpeg.org/mov/mp4/discont-frag.mp4
>
>
Hmm, indeed it does. The reason is that we read the sample count from the
stsz box and then read the trun box. I don't think this block of code has
ever been correct in that case:

http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavformat/mov.c;hb=HEAD#
l4287

It shifts all the ctts entries incorrectly and even did so prior to my
patch. I've uploaded a new version of my fix which simply deletes this
block of code. It passes all the fate test cases and those we have in
Chrome. Let me know if fails any of your private test cases.

- dale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sample_count_fix_v3.patch
Type: text/x-patch
Size: 3146 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170825/d84eb422/attachment.bin>


More information about the ffmpeg-devel mailing list