Am 12.04.2011 um 23:17 schrieb Ronald S. Bultje:

> Hi,
> 
> On Tue, Apr 12, 2011 at 5:13 PM, Justin Ruggles
> <[email protected]> wrote:
>> On 04/12/2011 02:41 PM, Max Horn wrote:
>>> @@ -510,6 +510,8 @@ void ff_get_wav_header(AVIOContext *pb, AVCodecContext 
>>> *codec, int size)
>>>          codec->extradata_size = cbSize;
>>>          if (cbSize > 0) {
>>>              codec->extradata = av_mallocz(codec->extradata_size + 
>>> FF_INPUT_BUFFER_PADDING_SIZE);
>>> +            if (codec->extradata == 0)
>>> +                return AVERROR(ENOMEM);
>>>              avio_read(pb, codec->extradata, codec->extradata_size);
>>>              size -= cbSize;
>>>          }
>> 
>> I think it would be more consistent with the reset of libav as either:
>> if (!codec->extradata)
>> or
>> if (codec->extradata == NULL)
> 
> Typical style in FFmpeg/Libav is to use if (!codec->extradata), let's
> adhere to that style.

Fine by me -- if anybody wants to actually commit this patch, or something 
equivalent to it, I am sure they will have no trouble making these style 
adjustments. As it is, it is seems to be rather impossible for me to guess what 
the "typical style" of libav is. Given that it's a big jumble of different 
styles, depending on what files you look at; and the rules on 
<http://libav.org/developer.html> aren't very comprehensive either.

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

Reply via email to