[FFmpeg-devel] [PATCH 12/13] lclenc: replace av_mallocz with av_malloc

Michael Niedermayer michaelni at gmx.at
Sat Jul 27 09:57:46 CEST 2013


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

[...]
-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130727/ff2086d1/attachment.asc>


More information about the ffmpeg-devel mailing list