[Ffmpeg-devel] [PATCH] remove useless check in amr.c

Måns Rullgård mru
Fri Feb 2 19:47:22 CET 2007


Benoit Fouet <benoit.fouet at purplelabs.com> writes:

> Hi,
>
> it seems to me there is an unneeded check in amr.c file
> here is a patch to suppress it
>
> Ben
>
> Index: libavcodec/amr.c
> ===================================================================
> --- libavcodec/amr.c	(revision 7807)
> +++ libavcodec/amr.c	(working copy)
> @@ -436,11 +436,6 @@
>
>      /* av_log(NULL,AV_LOG_DEBUG,"amr_decode_frame buf=%p buf_size=%d frameCount=%d!!\n",buf,buf_size,s->frameCount); */
>
> -    if(buf_size==0) {
> -        /* nothing to do */
> -        return 0;
> -    }
> -
>      dec_mode = (buf[0] >> 3) & 0x000F;

Rejected.  If buf_size is 0 that read of buf[0] is invalid.

-- 
M?ns Rullg?rd
mru at inprovide.com




More information about the ffmpeg-devel mailing list