diff options
author | Paul B Mahol <onemda@gmail.com> | 2023-09-23 01:40:51 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2023-09-23 01:42:49 +0200 |
commit | 5d98259841a698b58fe4ca4b95a0693f7fa587a7 (patch) | |
tree | 153a8c16b550e1587ea184304dcae50c2a0a1397 | |
parent | cdf0931fdb0825066dd78adda8c02ccae5400514 (diff) | |
download | ffmpeg-5d98259841a698b58fe4ca4b95a0693f7fa587a7.tar.gz |
avcodec/pnmdec: fix decoding with AVFrame's negative linesize
-rw-r--r-- | libavcodec/pnmdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index 72bc83b272..acd77ea810 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -137,7 +137,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, if(s->type < 4 || (is_mono && s->type==7)){ for (i=0; i<avctx->height; i++) { PutBitContext pb; - init_put_bits(&pb, ptr, linesize); + init_put_bits(&pb, ptr, FFABS(linesize)); for(j=0; j<avctx->width * components; j++){ unsigned int c=0; unsigned v=0; |