From edd532db64335ef7e41b83fd3fce6e2ad2592a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Reimar=20D=C3=B6ffinger?= Date: Mon, 2 Mar 2009 19:42:31 +0000 Subject: [PATCH] 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 --- libavcodec/bitstream.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h index e1ec934b28..0b336f747f 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); } }