[FFmpeg-cvslog] r25003 - trunk/libavcodec/a64multienc.c

Diego Biurrun diego
Tue Aug 31 14:07:53 CEST 2010


On Tue, Aug 31, 2010 at 09:14:47AM +0200, bindhammer wrote:
> 
> Log:
> Checking return values of av_malloc(z) and report an error in case.

Check ... in that case.

> --- trunk/libavcodec/a64multienc.c	Tue Aug 31 02:33:56 2010	(r25002)
> +++ trunk/libavcodec/a64multienc.c	Tue Aug 31 09:14:47 2010	(r25003)
> @@ -192,14 +192,21 @@ static av_cold int a64multi_init_encoder
>  
> +    if(!(c->mc_meta_charset  = av_malloc (32000 * c->mc_lifetime * sizeof(int))) ||

if (

> +       !(c->mc_best_cb       = av_malloc (CHARSET_CHARS * 32 * sizeof(int)))     ||

There should be no space after a function name in K&R.

> -    avctx->extradata      = av_mallocz(8 * 4 + FF_INPUT_BUFFER_PADDING_SIZE);
> +    if(!(avctx->extradata = av_mallocz(8 * 4 + FF_INPUT_BUFFER_PADDING_SIZE))) {

if (

Diego



More information about the ffmpeg-cvslog mailing list