Revision 71e445fc libavcodec/pnm.c

View differences:

libavcodec/pnm.c
124 124
        } else if (depth == 3) {
125 125
            avctx->pix_fmt = PIX_FMT_RGB24;
126 126
        } else if (depth == 4) {
127
            avctx->pix_fmt = PIX_FMT_RGBA32;
127
            avctx->pix_fmt = PIX_FMT_RGB32;
128 128
        } else {
129 129
            return -1;
130 130
        }
......
240 240
            }
241 241
        }
242 242
        break;
243
    case PIX_FMT_RGBA32:
243
    case PIX_FMT_RGB32:
244 244
        ptr = p->data[0];
245 245
        linesize = p->linesize[0];
246 246
        if(s->bytestream + avctx->width*avctx->height*4 > s->bytestream_end)
......
389 389
        maxval = 255;
390 390
        tuple_type = "RGB";
391 391
        break;
392
    case PIX_FMT_RGBA32:
392
    case PIX_FMT_RGB32:
393 393
        n = w * 4;
394 394
        depth = 4;
395 395
        maxval = 255;
......
406 406
    ptr = p->data[0];
407 407
    linesize = p->linesize[0];
408 408

  
409
    if (avctx->pix_fmt == PIX_FMT_RGBA32) {
409
    if (avctx->pix_fmt == PIX_FMT_RGB32) {
410 410
        int j;
411 411
        unsigned int v;
412 412

  
......
601 601
    pam_encode_frame,
602 602
    NULL, //encode_end,
603 603
    pnm_decode_frame,
604
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, -1},
604
    .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, -1},
605 605
};
606 606
#endif // CONFIG_PAM_ENCODER

Also available in: Unified diff