Diego Biurrun <[email protected]> writes: > I'll go for the return AVERROR, as in the attached patch, OK? > > Diego > > From 9df2aee21df40cb6376a325da8ba8a731884fafb Mon Sep 17 00:00:00 2001 > From: Diego Biurrun <[email protected]> > Date: Thu, 12 Mar 2015 19:32:58 +0100 > Subject: [PATCH] dca: Return error on too many downmix coefficients > > --- > libavcodec/dca_xll.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c > index 91934e3..86d8716 100644 > --- a/libavcodec/dca_xll.c > +++ b/libavcodec/dca_xll.c > @@ -159,11 +159,12 @@ int ff_dca_xll_decode_header(DCAContext *s) > chset->downmix_ncoeffs = (chset->channels + 1) * > s->xll_channels; > > if (chset->downmix_ncoeffs > DCA_XLL_DMIX_NCOEFFS_MAX) { > - av_log(s->avctx, AV_LOG_WARNING, > - "XLL: Skipping %d downmix coefficients, exceeding > implementation limit %d\n", > - chset->downmix_ncoeffs, DCA_XLL_DMIX_NCOEFFS_MAX); > skip_bits_long(&s->gb, 9 * chset->downmix_ncoeffs); > chset->downmix_ncoeffs = 0; > + avpriv_report_missing_feature(s->avctx, > + "XLL: More than %d downmix > coefficients", > + DCA_XLL_DMIX_NCOEFFS_MAX); > + return AVERROR_PATCHWELCOME;
Looks OK to me. I guess you could drop the two lines before avpriv_report_missing_feature too, if we're not going to try to go on without the coeffs. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
