[FFmpeg-cvslog] r25573 - trunk/libavcodec/vp3.c

darkshikari subversion
Tue Oct 26 09:29:01 CEST 2010


Author: darkshikari
Date: Tue Oct 26 09:29:00 2010
New Revision: 25573

Log:
Fix Theora decoding bug if loopfilter is completely disabled
Bug caused by the fact that get_bits(gb, 0) is undefined. 
Doesn't affect any streams generated by the official Theora encoder, but such
streams are nevertheless valid.

Fixes decoding of CELT-933dd833-nmr-bandt.ogv.

Modified:
   trunk/libavcodec/vp3.c

Modified: trunk/libavcodec/vp3.c
==============================================================================
--- trunk/libavcodec/vp3.c	Tue Oct 26 09:20:51 2010	(r25572)
+++ trunk/libavcodec/vp3.c	Tue Oct 26 09:29:00 2010	(r25573)
@@ -2052,6 +2052,7 @@ static int theora_decode_tables(AVCodecC
     if (s->theora >= 0x030200) {
         n = get_bits(gb, 3);
         /* loop filter limit values table */
+        if (n) {
         for (i = 0; i < 64; i++) {
             s->filter_limit_values[i] = get_bits(gb, n);
             if (s->filter_limit_values[i] > 127) {
@@ -2059,6 +2060,7 @@ static int theora_decode_tables(AVCodecC
                 s->filter_limit_values[i] = 127;
             }
         }
+        }
     }
 
     if (s->theora >= 0x030200)



More information about the ffmpeg-cvslog mailing list