On 11/24/2013 09:44 PM, Diego Biurrun wrote:
> On Sun, Nov 24, 2013 at 09:49:47AM -0800, John Stebbins wrote:
>> --- a/libavcodec/mpeg12dec.c
>> +++ b/libavcodec/mpeg12dec.c
>> @@ -1529,6 +1530,15 @@ static int mpeg_field_start(MpegEncContext *s, const 
>> uint8_t *buf, int buf_size)
>>  
>> +        if (s1->caption != NULL) {
> !s1->caption
>
>> +            if (sd != NULL) {
>> +                memcpy(sd->data, s1->caption, size);
>> +            }
> same, drop {}
>
Just verifying, this is the preferred style?  Because I see several other 
places in the code that enclose single lines
in braces.  I even see some other pending patches that are adding code that 
does this. I prefer the extra braces for
readability and it makes it so future patches don't require as much formatting 
changes. 

And treating pointers as booleans is a pet peeve of mine.  The code is more 
self documenting if you compare pointers to
pointers, ints to ints and save boolean operators for things that are truly 
meant to be boolean. But if this is libav
way, I won't say any more about it.

-- 
John      GnuPG fingerprint: D0EC B3DB C372 D1F1 0B01  83F0 49F1 D7B2 60D4 D0F7


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to