Revision 8fd64adf

View differences:

libavcodec/pnm.c
135 135
        s->maxval = atoi(buf1);
136 136
        if (s->maxval >= 256) {
137 137
            if (avctx->pix_fmt == PIX_FMT_GRAY8) {
138
            avctx->pix_fmt = PIX_FMT_GRAY16BE;
139
            if (s->maxval != 65535)
140
                avctx->pix_fmt = PIX_FMT_GRAY16;
138
                avctx->pix_fmt = PIX_FMT_GRAY16BE;
139
                if (s->maxval != 65535)
140
                    avctx->pix_fmt = PIX_FMT_GRAY16;
141 141
            } else {
142 142
                av_log(avctx, AV_LOG_ERROR, "16-bit components are only supported for grayscale\n");
143 143
                avctx->pix_fmt = PIX_FMT_NONE;

Also available in: Unified diff