better padding bug detection
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 2 Nov 2002 00:05:06 +0000 (00:05 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 2 Nov 2002 00:05:06 +0000 (00:05 +0000)
Originally committed as revision 1139 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/h263dec.c

index 3a49b97..676df6e 100644 (file)
@@ -251,10 +251,10 @@ static int decode_slice(MpegEncContext *s){
         
         if(bits_left==0 || bits_left>8){
             s->padding_bug_score++;
-        } else {
+        } else if(bits_left != 1){
             int v= show_bits(&s->gb, 8);
             v|= 0x7F >> (7-(bits_count&7));
-                
+
             if(v==0x7F)
                 s->padding_bug_score--;
             else