[vlc-devel] [PATCH 3/5] libmp4: modify MP4_BoxGetNextChunk()

Frederic YHUEL fyhuel at viotech.net
Wed May 23 16:48:36 CEST 2012


On Wed, May 23, 2012 at 3:21 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> On Tue, May 22, 2012 at 05:11:10PM +0200, Frédéric Yhuel wrote :
>> +    p_trash = calloc( 1, sizeof( MP4_Box_t ) );
>> +    if( unlikely( p_trash == NULL ) )
>> +        return NULL;
>
> Missing extra line
>

Ok

>> +    MP4_ReadBoxCommon( s, p_trash );
>> +    if( (p_trash->i_type == ATOM_uuid && !CmpUUID( &p_trash->i_uuid, &SmooBoxUUID ))
>> +            || p_trash->i_type == ATOM_ftyp )
>> +        return p_trash;
>> +    else
>> +        free( p_trash );
>
> Why?
>

Actually there is a sort of "semantic coupling" between the function
MP4_BoxGetNextChunk of libmp4.c, and the function fMP4_GetChunks of
mp4.c... :-s

This is ugly, I'm sorry... I'm going to modify that!

Best regards
Frédéric



More information about the vlc-devel mailing list