[FFmpeg-devel] [qt-faststart] Ever get "could not allocate 0x14 byte for ftyp atom"?

Mike Melanson mike
Thu Feb 28 19:58:09 CET 2008


Baptiste Coudurier wrote:
> Hi,
> 
> Bjoern Metzdorf wrote:
>> Kevin Campbell <kevin.t.campbell <at> gmail.com> writes:
>>
>>> Hello,
>>>
>>> I am checking with people to see if anyone has ever gotten this error after
>>> running qt-faststart.  I am pulling my hair out trying to figure out what
>>> the problem may be and wondered if anyone knew of a starting point.  I'll
>>> take anything!
>>>
>>> *Error:*
>>> *could not allocate 0x14 byte for ftyp atom*
>> Same problem here. Input mp4 is 40M big and qt-faststart takes all memory of the
>> machine and seems to run out of it then.. I tried nearly all revisions of
>> qt-faststart. r5169 instantly fails on my mp4 and from r5170 on this error
>> occurs after a while when memory is full.
>>
> 
> Well, if you send the sample, mabye someone could have a look.

I have reviewed the relevant code. It seems pretty clear-- the user
obviously doesn't have 0x14 bytes left to allocate. :)

ftyp_atom_size = atom_size;
ftyp_atom = malloc(ftyp_atom_size);
if (!ftyp_atom) {
    printf ("could not allocate 0x%llX byte for ftyp atom\n",
           atom_size);
    fclose(infile);
    return 1;
}

The second user explained that 5169 failed outright while 5170 fails
more spectacularly. 5170 was the first pass at loading FTYP. An error
message for 5169 would be nice but I suspect we will never get it. Nor
will we ever learn what tool generated the problem files.

One note about the FTYP loader code: it should probably sit after the
64-bit special case code. It's entirely possible -- though silly -- that
an FTYP atom could specify a 64-bit length field. Based on the available
data, that wouldn't be causing this failure.

-- 
	-Mike Melanson




More information about the ffmpeg-devel mailing list