diff h261dec.c @ 10535:95f3daa991a2 libavcodec

Use get_bits_left() instead of size_in_bits - get_bits_count().
author rbultje
date Mon, 16 Nov 2009 17:42:43 +0000
parents c78fd9154378
children f48de939cf88
line wrap: on
line diff
--- a/h261dec.c	Mon Nov 16 01:56:47 2009 +0000
+++ b/h261dec.c	Mon Nov 16 17:42:43 2009 +0000
@@ -170,7 +170,7 @@
         //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 +444,7 @@
     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)