[FFmpeg-devel] [PATCH] do not write empty udta atom

Baptiste Coudurier baptiste.coudurier
Wed Oct 24 13:07:13 CEST 2007


Benoit Fouet wrote:
> Baptiste Coudurier wrote:
>> Benoit Fouet wrote:
>>   
>>> Baptiste Coudurier wrote:
>>>     
>>>> Hi Benoit,
>>>>
>>>> Benoit Fouet wrote:
>>>>   
>>>>       
>>>>> Benoit Fouet wrote:
>>>>>     
>>>>>         
>>>>>> Baptiste Coudurier wrote:
>>>>>>   
>>>>>>       
>>>>>>           
>>>>>>> Benoit Fouet wrote:
>>>>>>>   
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> ATM, movenc.c writes the udta atom even if it is empty.
>>>>>>>> this patch checks that we have something to write before writing the atom.
>>>>>>>>
>>>>>>>>     
>>>>>>>>       
>>>>>>>>           
>>>>>>>>               
>>>>>>> Why creating an empty atom for MODE_MOV ? Do it for all.
>>>>>>> You forgot the libavformat ident.
>>>>>>>   
>>>>>>>     
>>>>>>>         
>>>>>>>             
>>>>>> i also forgot the requirements... thanks for noticing
>>>>>> updated patch attached.
>>>>>>
>>>>>>   
>>>>>>       
>>>>>>           
>>>>> ping ? Baptiste, Michael ?
>>>>>
>>>>>     
>>>>>         
>>>> req is for MODE_MOV only and LIBAVFORMAT_IDENT is also written for mp4
>>>> currently.
>>>>   
>>>>       
>>> at the moment, it is not, but this could be another patch...
>>>
>>>     
>> Seems LIBAVFORMAT_IDENT is only written for mp4 if any metadata is
>> written, so ok.
>>
>>   
> 
> LIBAVFORMAT_IDENT is only written in MODE_MOV ATM, and if not in
> bitexact mode.

It is also written in MODE_MP4 if any metadata is available, check
mov_write_ilst_tag.

> [...]
> +
> +    if (s->title[0]   || s->author[0] || s->album[0] || s->year ||
> +        s->comment[0] || s->genre[0]  || s->track ||
> +       (mov->mode == MODE_MOV &&
> +       (mov->tracks[0].enc && !mov->tracks[0].enc->flags & CODEC_FLAG_BITEXACT) || req)) {

movenc.c:1238: warning: suggest parentheses around && within ||

[...]

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG S.A.                                    http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312




More information about the ffmpeg-devel mailing list