id	summary	reporter	owner	description	type	status	priority	component	version	resolution	keywords	cc	blockedby	blocking	reproduced	analyzed
1890	avpriv_mpeg4audio_sample_rates vector size not correct	dellabetta		"in mpeg4audio.c

const int avpriv_mpeg4audio_sample_rates[16] = {
    96000, 88200, 64000, 48000, 44100, 32000,
    24000, 22050, 16000, 12000, 11025, 8000, 7350
};

but there are only 13 values!

in aacenc.c, the code

   for (i = 0; i < 16; i++)
        if (avctx->sample_rate == avpriv_mpeg4audio_sample_rates[i])
            break;

seems faulty.

IMHO avpriv_mpeg4audio_sample_rates should become

const int avpriv_mpeg4audio_sample_rates[13] = {
    96000, 88200, 64000, 48000, 44100, 32000,
    24000, 22050, 16000, 12000, 11025, 8000, 7350
};

and in aacenc.c you should safely write something like

   for (i = 0; i < FF_ARRAY_ELEMS(avpriv_mpeg4audio_sample_rates); i++)
        ...





"	defect	closed	normal	avcodec	git-master	invalid					0	0
