On Tue, Sep 04, 2012 at 03:25:40PM +0300, Martin Storsjö wrote:
> On Tue, 4 Sep 2012, Kostya Shishkov wrote:
>
> >On Tue, Sep 04, 2012 at 02:36:34PM +0300, Martin Storsjö wrote:
> >>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.
> >>---
> >> libavcodec/proresenc.c | 3 +--
> >> 1 file changed, 1 insertion(+), 2 deletions(-)
> >>
> >>diff --git a/libavcodec/proresenc.c b/libavcodec/proresenc.c
> >>index a24b711..f4feed5 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;
> >>
> >>--
> >
> >LGTM though I vaguely remember there was something similar in FFmpeg already.
>
> That might be possible - I didn't check for this one but just
> changed it as I saw fit.
I don't care much either.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel