changeset 9095:50e847b72cdd libavcodec

Simplify show_bits_long and copy the GetBitsContext around only once instead of twice.
author reimar
date Mon, 02 Mar 2009 19:42:31 +0000
parents 39425084bd5c
children 005cf8ba225f
files bitstream.h
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/bitstream.h	Mon Mar 02 17:32:53 2009 +0000
+++ b/bitstream.h	Mon Mar 02 19:42:31 2009 +0000
@@ -713,9 +713,7 @@
     if(n<=17) return show_bits(s, n);
     else{
         GetBitContext gb= *s;
-        int ret= get_bits_long(s, n);
-        *s= gb;
-        return ret;
+        return get_bits_long(&gb, n);
     }
 }