aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2023-03-09 13:57:14 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2023-06-04 20:18:23 +0200
commit9989fd451685b1b050622b6c5a21c1f99e22f0db (patch)
tree24377fe7763e212aad473c5ff26ae4fef999a295
parente7ae341c2ab73149d98f066ca9d5fadbbf785d9a (diff)
downloadffmpeg-9989fd451685b1b050622b6c5a21c1f99e22f0db.tar.gz
libavcodec/lcldec: width and height should not be unsigned
Computations like col < width - 3 will not work with unsigned width=1 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 3eb4e28c26c3bce608214f392ab1fe6ee28ec1df) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/lcldec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 104defa5f5..ed87e6179b 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -166,8 +166,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
int row, col;
unsigned char *encoded = avpkt->data, *outptr;
uint8_t *y_out, *u_out, *v_out;
- unsigned int width = avctx->width; // Real image width
- unsigned int height = avctx->height; // Real image height
+ int width = avctx->width; // Real image width
+ int height = avctx->height; // Real image height
unsigned int mszh_dlen;
unsigned char yq, y1q, uq, vq;
int uqvq, ret;