diff options
author | Jai Luthra <me@jailuthra.in> | 2020-01-24 13:33:30 +0300 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-02-04 13:19:12 +0300 |
commit | c1c3916cec9ca627b9bff4a34683f66664ff787d (patch) | |
tree | 8a775abfc0ab19732d08aa83a2afc8b24f4c58ef /libavcodec/mlpenc.c | |
parent | efee86fafa9cc6bbe5a64ef256cb0cd0ef34971e (diff) |
mlpenc: fix lossless check error in number_sbits
we need two bits instead of one bit to represent -1 in bitstream
Signed-off-by: Jai Luthra <me@jailuthra.in>
Diffstat (limited to 'libavcodec/mlpenc.c')
-rw-r--r-- | libavcodec/mlpenc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c index deb171645c..f4948451f1 100644 --- a/libavcodec/mlpenc.c +++ b/libavcodec/mlpenc.c @@ -466,7 +466,7 @@ static void default_decoding_params(MLPEncodeContext *ctx, */ static int inline number_sbits(int number) { - if (number < 0) + if (number < -1) number++; return av_log2(FFABS(number)) + 1 + !!number; |