]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/h261dec.c
Theora 3.4 doesn't exist; these fields were misunderstandings of the spec
[ffmpeg] / libavcodec / h261dec.c
index d5dcc0b2c4953ca6680a54b4091917ab764da44b..ab266a0f6cdc5513a44ca5dcd7925534e51876fd 100644 (file)
@@ -28,6 +28,7 @@
 #include "dsputil.h"
 #include "avcodec.h"
 #include "mpegvideo.h"
+#include "h263.h"
 #include "h261.h"
 #include "h261data.h"
 
@@ -170,7 +171,7 @@ static int ff_h261_resync(H261Context *h){
         //OK, it is not where it is supposed to be ...
         s->gb= s->last_resync_gb;
         align_get_bits(&s->gb);
-        left= s->gb.size_in_bits - get_bits_count(&s->gb);
+        left= get_bits_left(&s->gb);
 
         for(;left>15+1+4+5; left-=8){
             if(show_bits(&s->gb, 15)==0){
@@ -444,7 +445,7 @@ static int h261_decode_picture_header(H261Context *h){
     int format, i;
     uint32_t startcode= 0;
 
-    for(i= s->gb.size_in_bits - get_bits_count(&s->gb); i>24; i-=1){
+    for(i= get_bits_left(&s->gb); i>24; i-=1){
         startcode = ((startcode << 1) | get_bits(&s->gb, 1)) & 0x000FFFFF;
 
         if(startcode == 0x10)