comparison bitstream.c @ 3629:2ab6ec6259b1 libavcodec

move align_get_bits() to .h to avoid conflicts between different bitstream readers in different codecs add a skip_bits_long() which can skip by any amount in any direction (several codecs contain half working hacks to do that)
author michael
date Sat, 26 Aug 2006 10:26:14 +0000
parents 0b546eab515d
children c44d798b06b5
comparison
equal deleted inserted replaced
3628:ce878aa023fe 3629:2ab6ec6259b1
69 GetBitContext gb= *s; 69 GetBitContext gb= *s;
70 int ret= get_bits_long(s, n); 70 int ret= get_bits_long(s, n);
71 *s= gb; 71 *s= gb;
72 return ret; 72 return ret;
73 } 73 }
74 }
75
76 void align_get_bits(GetBitContext *s)
77 {
78 int n= (-get_bits_count(s)) & 7;
79 if(n) skip_bits(s, n);
80 } 74 }
81 75
82 int check_marker(GetBitContext *s, const char *msg) 76 int check_marker(GetBitContext *s, const char *msg)
83 { 77 {
84 int bit= get_bits1(s); 78 int bit= get_bits1(s);