[FFmpeg-devel] [PATCH 12/13] lclenc: replace av_mallocz with av_malloc
Paul B Mahol
onemda at gmail.com
Sat Jul 27 12:50:36 CEST 2013
On 7/27/13, Michael Niedermayer <michaelni at gmx.at> wrote:
> On Fri, Jul 26, 2013 at 10:26:54PM +0000, Paul B Mahol wrote:
>> Also check return value.
>>
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>> libavcodec/lclenc.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c
>> index 731c2fc..3a0af87 100644
>> --- a/libavcodec/lclenc.c
>> +++ b/libavcodec/lclenc.c
>> @@ -135,7 +135,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
>>
>> av_assert0(avctx->width && avctx->height);
>>
>> - avctx->extradata= av_mallocz(8);
>> + avctx->extradata = av_malloc(8 + FF_INPUT_BUFFER_PADDING_SIZE);
>
> the FF_INPUT_BUFFER_PADDING_SIZE should be initialized to 0
Hmm, but there is more cases in codebase when it is not....
Changed.
>
> [...]
> --
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Complexity theory is the science of finding the exact solution to an
> approximation. Benchmarking OTOH is finding an approximation of the exact
>
More information about the ffmpeg-devel
mailing list