1
0
Fork 0

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

This commit is contained in:
Paul B Mahol 2023-09-23 01:40:51 +02:00
parent cdf0931fdb
commit 5d98259841
1 changed files with 1 additions and 1 deletions

View File

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