[FFmpeg-devel] [PATCH] qt-faststart: Abort scanning the input file if a bad atom is found
Fri Apr 30 20:18:19 CEST 2010
On 04/30/2010 06:42 AM, Daniel G. Taylor wrote:
> On 04/30/2010 06:36 AM, Martin Storsj? wrote:
>> The attached patch avoids hanging forever if encountering atoms of
>> size 0.
>> (Such files aren't valid, of course, but it's better to abort the
>> application instead of looping infinitely.)
> There are actually some valid files that seem to end with an mdat atom
> of zero size, and this patch would allow qt-faststart to process them. I
> applied a similar patch to my Python port a while back here:
> In case of those files where the mdat size is zero but the data is there
> you may want to break and just read until the end of the file rather
> than exiting.
Indeed, mdat 0 size is allowed but the atom must be the last in the file.
So aborting on atom_size < 8 is not correct in that case.
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
FFmpeg maintainer http://www.ffmpeg.org
More information about the ffmpeg-devel