avcodec/mpegaudioenc_template: dont crash on bitrate=0

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2014-04-09 05:16:52 +02:00
parent d98688efb1
commit 9d66aa2c8f

View File

@ -108,7 +108,7 @@ static av_cold int MPA_encode_init(AVCodecContext *avctx)
s->freq_index = i;
/* encoding bitrate & frequency */
for(i=0;i<15;i++) {
for(i=1;i<15;i++) {
if (avpriv_mpa_bitrate_tab[s->lsf][1][i] == bitrate)
break;
}