[FFmpeg-cvslog] libavcodec/lcldec: width and height should not be unsigned
Michael Niedermayer
git at videolan.org
Mon Oct 30 02:09:19 EET 2023
ffmpeg | branch: release/5.1 | Michael Niedermayer <michael at niedermayer.cc> | Thu Mar 9 13:57:14 2023 +0100| [8abcd8b124bc83136c6de2823dd388eff37a75dd] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 3eb4e28c26c3bce608214f392ab1fe6ee28ec1df)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8abcd8b124bc83136c6de2823dd388eff37a75dd
---
libavcodec/lcldec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/lcldec.c b/libavcodec/lcldec.c
index ffa2fe5a6d..1bea618eeb 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;
More information about the ffmpeg-cvslog
mailing list