On 12/11/14 11:13, Vittorio Giovara wrote:
> From: Michael Niedermayer <michae...@gmx.at>
> 
> CC: libav-sta...@libav.org
> Bug-Id: CID 741418
> ---
>  libavcodec/cook.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/cook.c b/libavcodec/cook.c
> index 056c7d9..dfc2b5a 100644
> --- a/libavcodec/cook.c
> +++ b/libavcodec/cook.c
> @@ -1046,7 +1046,7 @@ static av_cold int cook_decode_init(AVCodecContext 
> *avctx)
>      int extradata_size = avctx->extradata_size;
>      int s = 0;
>      unsigned int channel_mask = 0;
> -    int samples_per_frame;
> +    int samples_per_frame = 0;
>      int ret;
>      q->avctx = avctx;
>  
> 

Looks fishy, samples_per_frame = 0 would be wrong.

If I read the code correctly you need at _least_ 16 byte extradata
assuming that you really have an implicit last-one-as-theprevious
signalled by adding 1 extra byte after the 16.

lu
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to