On 24/02/2017 19:24, Anton Khirnov wrote: > Quoting Luca Barbato (2017-02-24 15:21:01) >> Bug-Id: 1016 >> >> CC: [email protected] >> --- >> >> This is the possibly less ugly and still working. >> >> libavcodec/dcadec.c | 3 +++ >> 1 file changed, 3 insertions(+) >> >> diff --git a/libavcodec/dcadec.c b/libavcodec/dcadec.c >> index be277d2..fa2a240 100644 >> --- a/libavcodec/dcadec.c >> +++ b/libavcodec/dcadec.c >> @@ -1299,6 +1299,9 @@ static int set_channel_layout(AVCodecContext *avctx, >> int channels, int num_core_ >> s->channel_order_tab = >> ff_dca_channel_reorder_nolfe[s->amode]; >> } >> >> + if (channels < ff_dca_channels[s->amode]) >> + return AVERROR_INVALIDDATA; >> + >> if (channels > !!s->lfe && >> s->channel_order_tab[channels - 1 - !!s->lfe] < 0) >> return AVERROR_INVALIDDATA; >> -- >> 2.10.1 > > It's very much non-obvious what exactly does this fix and how, and why > this specific fix is the right way to do it. >
With the explanation below, is the patch ok ? lu _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
