[FFmpeg-devel] [PATCH 2/2] avcodec/mlpenc: fix undefined shift
Paul B Mahol
onemda at gmail.com
Tue Nov 28 21:55:44 EET 2017
Decreases artifacts.
Signed-off-by: Paul B Mahol <onemda at gmail.com>
---
libavcodec/mlpenc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mlpenc.c b/libavcodec/mlpenc.c
index c588f5b904..eceb0ddbb2 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 <= 0)
number++;
return av_log2(FFABS(number)) + 1 + !!number;
--
2.11.0
More information about the ffmpeg-devel
mailing list