qdm2: fix incorrect error spam
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 31 May 2012 22:35:06 +0000 (00:35 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 31 May 2012 22:35:06 +0000 (00:35 +0200)
Fixes Ticket1375

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/qdm2.c

index 7a5d072..aa180fd 100644 (file)
@@ -1363,7 +1363,8 @@ static void qdm2_fft_decode_tones (QDM2Context *q, int duration, GetBitContext *
         if (q->superblocktype_2_3) {
             while ((n = qdm2_get_vlc(gb, &vlc_tab_fft_tone_offset[local_int_8], 1, 2)) < 2) {
                 if (get_bits_left(gb)<0) {
         if (q->superblocktype_2_3) {
             while ((n = qdm2_get_vlc(gb, &vlc_tab_fft_tone_offset[local_int_8], 1, 2)) < 2) {
                 if (get_bits_left(gb)<0) {
-                    av_log(0, AV_LOG_ERROR, "overread in qdm2_fft_decode_tones()\n");
+                    if(local_int_4 < q->group_size)
+                        av_log(0, AV_LOG_ERROR, "overread in qdm2_fft_decode_tones()\n");
                     return;
                 }
                 offset = 1;
                     return;
                 }
                 offset = 1;