1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

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>
This commit is contained in:
Jai Luthra 2020-01-24 16:03:30 +05:30 committed by Paul B Mahol
parent efee86fafa
commit c1c3916cec

View File

@ -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;