diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-29 03:55:03 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-29 03:56:26 +0200 |
commit | a3539d26eceebe69d890ad39e2ab0dcc19433246 (patch) | |
tree | 7ec11a6b7101dbb1876a6d9c43229a919fec70a9 /libavcodec/put_bits.h | |
parent | 7118358a950e20a4439d796f16892b27dad6c754 (diff) | |
parent | 4ff5167ee7fdee6d35c1bb2558172329ae6ec770 (diff) | |
download | ffmpeg-a3539d26eceebe69d890ad39e2ab0dcc19433246.tar.gz |
Merge commit '4ff5167ee7fdee6d35c1bb2558172329ae6ec770' into release/0.10
* commit '4ff5167ee7fdee6d35c1bb2558172329ae6ec770':
wmapro: make sure there is room to store the current packet
lavc: move put_bits_left in put_bits.h
4xm: do not overread the source buffer in decode_p_block
4xm: check bitstream_size boundary before using it
4xm: reject frames not compatible with the declared version
4xm: use the correct logging context
4xm: check the return value of read_huffman_tables().
4xm: don't rely on get_buffer() initializing the frame.
vmdav: convert to bytestream2
smacker: check frame size validity
smacker: pad the extradata allocation
smacker: check the return value of smacker_decode_tree
smacker: fix an off by one in huff.length computation
Prepare for 0.8.8 Release
tiff: do not overread the source buffer
apetag: use int64_t for filesize
wavpack: return meaningful errors
Conflicts:
RELEASE
libavcodec/4xm.c
libavcodec/vmdav.c
libavformat/smacker.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/put_bits.h')
-rw-r--r-- | libavcodec/put_bits.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h index 9256e7fa4d..a5bc7314a7 100644 --- a/libavcodec/put_bits.h +++ b/libavcodec/put_bits.h @@ -73,6 +73,14 @@ static inline int put_bits_count(PutBitContext *s) } /** + * @return the number of bits available in the bitstream. + */ +static inline int put_bits_left(PutBitContext* s) +{ + return (s->buf_end - s->buf_ptr) * 8 - 32 + s->bit_left; +} + +/** * Pad the end of the output stream with zeros. */ static inline void flush_put_bits(PutBitContext *s) |