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. Ronald _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
