aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJai Luthra <me@jailuthra.in>2020-01-24 16:03:30 +0530
committerPaul B Mahol <onemda@gmail.com>2020-02-04 11:19:12 +0100
commitc1c3916cec9ca627b9bff4a34683f66664ff787d (patch)
tree8a775abfc0ab19732d08aa83a2afc8b24f4c58ef
parentefee86fafa9cc6bbe5a64ef256cb0cd0ef34971e (diff)
downloadffmpeg-c1c3916cec9ca627b9bff4a34683f66664ff787d.tar.gz
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>
-rw-r--r--libavcodec/mlpenc.c2
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;