[SCM] libav/experimental: Simplify show_bits_long and copy the GetBitsContext around only once instead of twice.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:40:15 UTC 2013


The following commit has been merged in the experimental branch:
commit edd532db64335ef7e41b83fd3fce6e2ad2592a7e
Author: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
Date:   Mon Mar 2 19:42:31 2009 +0000

    Simplify show_bits_long and copy the GetBitsContext around only once instead of twice.
    
    Originally committed as revision 17736 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h
index e1ec934..0b336f7 100644
--- a/libavcodec/bitstream.h
+++ b/libavcodec/bitstream.h
@@ -713,9 +713,7 @@ static inline unsigned int show_bits_long(GetBitContext *s, int n){
     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);
     }
 }
 

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list