[FFmpeg-cvslog] avcodec/notchlc: make variables that can be negative as signed

Paul B Mahol git at videolan.org
Sat Sep 23 23:49:45 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sat Sep 23 22:46:09 2023 +0200| [b61733f61ff2f61b1208fb661e278f704680d6a6] | committer: Paul B Mahol

avcodec/notchlc: make variables that can be negative as signed

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b61733f61ff2f61b1208fb661e278f704680d6a6
---

 libavcodec/notchlc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libavcodec/notchlc.c b/libavcodec/notchlc.c
index d973c83ac7..0feb0918f0 100644
--- a/libavcodec/notchlc.c
+++ b/libavcodec/notchlc.c
@@ -76,12 +76,13 @@ static int lz4_decompress(AVCodecContext *avctx,
                           GetByteContext *gb,
                           PutByteContext *pb)
 {
-    unsigned reference_pos, match_length, delta, pos = 0;
+    unsigned reference_pos, delta, pos = 0;
     uint8_t history[64 * 1024];
+    int match_length;
 
     while (bytestream2_get_bytes_left(gb) > 0) {
         uint8_t token = bytestream2_get_byte(gb);
-        unsigned num_literals = token >> 4;
+        int num_literals = token >> 4;
 
         if (num_literals == 15) {
             unsigned char current;



More information about the ffmpeg-cvslog mailing list