avcodec/put_bits: Always check buffer end before writing
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 1 Jan 2016 01:41:06 +0000 (02:41 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Fri, 15 Jan 2016 15:00:31 +0000 (16:00 +0100)
commitb65c06ee5efefe96f1dccf65c68174099ba26d7a
treef076303db3c6978ec8abd71d24a94f564f0cdb41
parenta7a7c6e44c403d64cdd2fd3e8f83b796274fe40e
avcodec/put_bits: Always check buffer end before writing

This causes a overall slowdown of 0.1 % (tested with mpeg4 single thread encoding of matrixbench at QP=3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cccb0ffccc3723acc7aab3a859b24743596dd9c0)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/put_bits.h