avcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 17 Jun 2015 22:34:59 +0000 (00:34 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 17 Jun 2015 23:01:06 +0000 (01:01 +0200)
Fixes Ticket4636

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/ffv1enc.c

index af727a5..45ab3a3 100644 (file)
@@ -753,7 +753,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
         s->chroma_planes = desc->nb_components < 3 ? 0 : 1;
         s->colorspace = 0;
         s->transparency = desc->nb_components == 4;
-        if (!avctx->bits_per_raw_sample)
+        if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample)
             s->bits_per_raw_sample = 8;
         break;
     case AV_PIX_FMT_RGB32: