]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/huffyuvenc: init bps from pixel descriptor
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 13 Jan 2014 00:13:29 +0000 (01:13 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 16 Jan 2014 15:24:24 +0000 (16:24 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/huffyuvenc.c

index 52244809ab8de729ceb2e2752923aa096a83e8a7..bd633a2fedfe9e1c1c8cf7f6363e29b1f192b33c 100644 (file)
@@ -188,7 +188,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
     avctx->coded_frame->pict_type = AV_PICTURE_TYPE_I;
     avctx->coded_frame->key_frame = 1;
 
-    s->bps = 8;
+    s->bps = desc->comp[0].depth_minus1 + 1;
     s->yuv = !(desc->flags & AV_PIX_FMT_FLAG_RGB) && desc->nb_components >= 2;
     s->chroma = desc->nb_components > 2;
     s->alpha = !!(desc->flags & AV_PIX_FMT_FLAG_ALPHA);