put_bits: fix invalid shift by 32 in flush_put_bits()
authorMans Rullgard <mans@mansr.com>
Sat, 8 Oct 2011 01:09:42 +0000 (02:09 +0100)
committerMans Rullgard <mans@mansr.com>
Sat, 8 Oct 2011 01:41:58 +0000 (02:41 +0100)
commitac6eab1496aad6f8b09deabbef4fe5fd829e142d
tree48f34a0725a7da2f72dfe757bdf90f1a1f6d0dfc
parent98ef887a759c66febcb612407c6bb361c4d50bcb
put_bits: fix invalid shift by 32 in flush_put_bits()

If flush_put_bits() is called when the 32-bit buffer is empty,
e.g. after writing a multiple of 32 bits, and invalid shift by
32 is performed.  Since flush_put_bits() is called infrequently,
this additional check should have negligible performance impact.

Signed-off-by: Mans Rullgard <mans@mansr.com>
libavcodec/put_bits.h