On Mon, Nov 10, 2014 at 10:09 AM, Luca Barbato <[email protected]> wrote: > On 10/11/14 08:08, Vittorio Giovara wrote: >> >> On Sun, Nov 9, 2014 at 12:12 PM, Luca Barbato <[email protected]> wrote: >>> >>> On 09/11/14 08:29, Vittorio Giovara wrote: >>>> >>>> >>>> On Fri, Nov 7, 2014 at 6:08 PM, Luca Barbato <[email protected]> wrote: >>>>> >>>>> >>>>> On 30/10/14 01:52, Vittorio Giovara wrote: >>>>>> >>>>>> >>>>>> >>>>>> CC: [email protected] >>>>>> Bug-Id: CID 1087090 >>>>>> --- >>>>>> libavcodec/aacdec.c | 2 +- >>>>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>>>> >>>>>> diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c >>>>>> index cc74bd6..6fca9b1 100644 >>>>>> --- a/libavcodec/aacdec.c >>>>>> +++ b/libavcodec/aacdec.c >>>>>> @@ -143,7 +143,7 @@ static av_cold int che_configure(AACContext *ac, >>>>>> enum ChannelPosition che_pos, >>>>>> int type, int id, int *channels) >>>>>> { >>>>>> - if (*channels >= MAX_CHANNELS) >>>>>> + if (*channels >= MAX_CHANNELS - 2) >>>>>> return AVERROR_INVALIDDATA; >>>>>> if (che_pos) { >>>>>> if (!ac->che[type][id]) { >>>>>> >>>>> >>>>> why -2 ? >>>> >>>> >>>> >>>> Because down in the function there are two "(*channels)++" that >>>> trigger the warning. >>>> >>> >>> You should move the check where is needed as well.
I think this function is used to check the validity of the whole configuration, so moving the check for the number of channels inside an if will change the original purpose no? -- Vittorio _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
