avcodec/mpegaudioenc_template: dont crash on bitrate=0
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 9 Apr 2014 03:16:52 +0000 (05:16 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 9 Apr 2014 03:16:52 +0000 (05:16 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mpegaudioenc_template.c

index ae57328..5ae4269 100644 (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;
     }