[FFmpeg-devel] [PATCH] qt-faststart: Abort scanning the input file if a bad atom is found

Daniel G. Taylor dan
Fri Apr 30 15:42:53 CEST 2010

On 04/30/2010 06:36 AM, Martin Storsj? wrote:
> Hi,
> 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.

Take care,
Daniel G. Taylor

More information about the ffmpeg-devel mailing list