On Sun, Nov 23, 2014 at 3:09 PM, Luca Barbato <lu_z...@gentoo.org> wrote: > At least 8 bytes are needed (Mono audio). > > Bug-Id: CID 741418 > CC: libav-sta...@libav.org > --- > > I guess is quicker getting you the patch =P cook uses the first 8 bytes to > setup > for mono, then 8 more for stereo and random number for multichannel. > > libavcodec/cook.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/cook.c b/libavcodec/cook.c > index 056c7d9..8c2fab7 100644 > --- a/libavcodec/cook.c > +++ b/libavcodec/cook.c > @@ -1051,7 +1051,7 @@ static av_cold int cook_decode_init(AVCodecContext > *avctx) > q->avctx = avctx; > > /* Take care of the codec specific extradata. */ > - if (extradata_size <= 0) { > + if (extradata_size < 8) { > av_log(avctx, AV_LOG_ERROR, "Necessary extradata missing!\n"); > return AVERROR_INVALIDDATA; > }
lgtm -- Vittorio _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel