1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

proresenc: Write the full value in one put_bits call

Previously, the put_bits call writing the value wrote a value
larger than the number of bits specified, failing asserts
in debug mode. There was no actual bitstream writer corruption,
since the overwritten bit already always was set to 1.

Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
Martin Storsjö
2012-09-04 14:31:52 +03:00
parent aa264da5bf
commit 6d9e74cd41

View File

@@ -299,8 +299,7 @@ static inline void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int
exponent = av_log2(val);
put_bits(pb, exponent - exp_order + switch_bits, 0);
put_bits(pb, 1, 1);
put_bits(pb, exponent, val);
put_bits(pb, exponent + 1, val);
} else {
exponent = val >> rice_order;