1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/pcx: fix decoding with AVFrame's negative linesize

This commit is contained in:
Paul B Mahol 2023-09-23 01:28:44 +02:00
parent ee357d6991
commit cdf0931fdb

View File

@ -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");