From 71a48ff23c6b797a516337b768d98c6985f6158a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 5 Feb 2009 18:25:01 +0000 Subject: [PATCH] Add size_in_bits to PutBitContext Originally committed as revision 17006 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/bitstream.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/bitstream.h b/libavcodec/bitstream.h index 62b8bc9f6c..e1ec934b28 100644 --- a/libavcodec/bitstream.h +++ b/libavcodec/bitstream.h @@ -85,6 +85,7 @@ typedef struct PutBitContext { int bit_left; uint8_t *buf, *buf_ptr, *buf_end; #endif + int size_in_bits; } PutBitContext; static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_size) @@ -94,6 +95,7 @@ static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_s buffer = NULL; } + s->size_in_bits= 8*buffer_size; s->buf = buffer; s->buf_end = s->buf + buffer_size; #ifdef ALT_BITSTREAM_WRITER