diff options
author | Martin Storsjö <martin@martin.st> | 2012-09-04 14:31:52 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2012-09-04 15:31:47 +0300 |
commit | 6d9e74cd4179f42a8fa860f2e08d370c7c36325f (patch) | |
tree | e41e0185a7c11a46ad2b80bd4b1912823307fa0b /libavcodec/proresenc.c | |
parent | aa264da5bf6a3d82a47abba4cfcfa629dd1f3daa (diff) | |
download | ffmpeg-6d9e74cd4179f42a8fa860f2e08d370c7c36325f.tar.gz |
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>
Diffstat (limited to 'libavcodec/proresenc.c')
-rw-r--r-- | libavcodec/proresenc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c index a24b7118c2..f4feed5ee4 100644 --- a/libavcodec/proresenc.c +++ b/libavcodec/proresenc.c @@ -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; |