avcodec/ffv1enc: fix bps for >8bit yuv when not explicitly set

Fixes Ticket4636

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/138/head
Michael Niedermayer 10 years ago
parent 47cadf4d1f
commit 3a6a8f6ee1
  1. 2
      libavcodec/ffv1enc.c

@ -753,7 +753,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
s->chroma_planes = desc->nb_components < 3 ? 0 : 1; s->chroma_planes = desc->nb_components < 3 ? 0 : 1;
s->colorspace = 0; s->colorspace = 0;
s->transparency = desc->nb_components == 4; 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; s->bits_per_raw_sample = 8;
break; break;
case AV_PIX_FMT_RGB32: case AV_PIX_FMT_RGB32:

Loading…
Cancel
Save