aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-09-23 01:28:44 +0200
committerPaul B Mahol <onemda@gmail.com>2023-09-23 01:42:48 +0200
commitcdf0931fdb0825066dd78adda8c02ccae5400514 (patch)
tree58b7e9187189fb6dc7bed78d64d83f70ebc1501e /libavcodec
parentee357d6991524f146dd1c36496395cedae0309be (diff)
downloadffmpeg-cdf0931fdb0825066dd78adda8c02ccae5400514.tar.gz
avcodec/pcx: fix decoding with AVFrame's negative linesize
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/pcx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pcx.c b/libavcodec/pcx.c
index 4cca497298..8e2aae7b5e 100644
--- a/libavcodec/pcx.c
+++ b/libavcodec/pcx.c
@@ -75,9 +75,10 @@ static int pcx_decode_frame(AVCodecContext *avctx, AVFrame *p,
GetByteContext gb;
int compressed, xmin, ymin, xmax, ymax;
int ret;
- unsigned int w, h, bits_per_pixel, bytes_per_line, nplanes, stride, y, x,
+ unsigned int w, h, bits_per_pixel, bytes_per_line, nplanes, y, x,
bytes_per_scanline;
uint8_t *ptr, *scanline;
+ ptrdiff_t stride;
if (avpkt->size < PCX_HEADER_SIZE) {
av_log(avctx, AV_LOG_ERROR, "Packet too small\n");