Ticket #882: pam48.diff

File pam48.diff, 638 bytes (added by ami_stuff, 15 years ago)
  • libavcodec/pnm.c

    diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
    index 680034a..8796948 100644
    a b int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)  
    119119            if (maxval < 256) {
    120120            avctx->pix_fmt = PIX_FMT_RGB24;
    121121            } else {
    122                 av_log(avctx, AV_LOG_ERROR, "16-bit components are only supported for grayscale\n");
    123                 avctx->pix_fmt = PIX_FMT_NONE;
    124                 return -1;
     122                avctx->pix_fmt = PIX_FMT_RGB48BE;
    125123            }
    126124        } else if (depth == 4) {
    127125            avctx->pix_fmt = PIX_FMT_RGB32;