[FFmpeg-cvslog] avcodec/put_bits: Assert buf_ptr in flush_put_bits()

Michael Niedermayer git at videolan.org
Sun Jan 31 00:43:13 CET 2016


ffmpeg | branch: release/2.7 | Michael Niedermayer <michael at niedermayer.cc> | Mon Jan 18 17:13:55 2016 +0100| [f6755e5e19eb84de3e9f6838406d9f1f240c02b9] | committer: Michael Niedermayer

avcodec/put_bits: Assert buf_ptr in flush_put_bits()

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 3ef5de0f19774e2c3dd9b08ba2e8ab7241a4862a)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6755e5e19eb84de3e9f6838406d9f1f240c02b9
---

 libavcodec/put_bits.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index 0db8a03..68ed391 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -105,7 +105,7 @@ static inline void flush_put_bits(PutBitContext *s)
         s->bit_buf <<= s->bit_left;
 #endif
     while (s->bit_left < 32) {
-        /* XXX: should test end of buffer */
+        av_assert0(s->buf_ptr < s->buf_end);
 #ifdef BITSTREAM_WRITER_LE
         *s->buf_ptr++ = s->bit_buf;
         s->bit_buf  >>= 8;



More information about the ffmpeg-cvslog mailing list