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

pull/390/head
Paul B Mahol 1 year ago
parent cdf0931fdb
commit 5d98259841
  1. 2
      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;

Loading…
Cancel
Save