From 4c15f3491f1991554ad497788dfb6ad02b552134 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Tue, 6 Aug 2013 00:26:21 +0200 Subject: [PATCH] Set bits_per_raw_sample when decoding pnm. --- libavcodec/pnmdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index df9b5ee2e4..c7a7a44680 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -58,6 +58,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, return ret; p->pict_type = AV_PICTURE_TYPE_I; p->key_frame = 1; + avctx->bits_per_raw_sample = av_log2(s->maxval) + 1; switch (avctx->pix_fmt) { default: