[FFmpeg-cvslog] r16452 - trunk/libavformat/metadata.c

Måns Rullgård mans
Tue Jan 6 16:46:21 CET 2009


Aurelien Jacobs wrote:
> On Tue, 6 Jan 2009 15:52:54 +0100
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
>
>> On Tue, Jan 06, 2009 at 01:56:21PM +0100, aurel wrote:
>> > Modified: trunk/libavformat/metadata.c
>> > ==============================================================================
>> > --- trunk/libavformat/metadata.c	Tue Jan  6 13:51:35 2009	(r16451)
>> > +++ trunk/libavformat/metadata.c	Tue Jan  6 13:56:21 2009	(r16452)
>> > @@ -84,7 +84,7 @@ int av_metadata_set(AVMetadata **pm, AVM
>> >  #define FILL_METADATA_INT(s, key) {                                      \
>> >      char number[10];                                                     \
>> >      snprintf(number, sizeof(number), "%d", s->key);                      \

Unrelated to this patch, but that buffer is too small.  A signed 32-bit
number needs up to 11 characters in decimal (minus sign and 10 digits).

>> > -    FILL_METADATA(s, key, number) }
>> > +    if(s->key)  FILL_METADATA(s, key, number) }
>>
>> Why two spaces?
>
> Why not...
> When I write a statement on the same line as a if(),

Why do you do that?

-- 
M?ns Rullg?rd
mans at mansr.com




More information about the ffmpeg-cvslog mailing list