[FFmpeg-devel] [PATCH 1/4] libavcodec/lcldec: width and height should not be unsigned
Michael Niedermayer
michael at niedermayer.cc
Thu Mar 9 14:57:14 EET 2023
Computations like col < width - 3 will not work with unsigned width=1
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavcodec/lcldec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index 5cc0a29bcd..95206eeb69 100644
--- a/libavcodec/lcldec.c
+++ b/libavcodec/lcldec.c
@@ -169,8 +169,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
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;
--
2.17.1
More information about the ffmpeg-devel
mailing list