From 749f85496ccff345ec811976ce45ec9e1900e9a8 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 20 Jul 2015 02:10:04 +0200 Subject: avcodec/ffv1enc: fix assertion failure with unset bits per raw sample Signed-off-by: Michael Niedermayer --- libavcodec/ffv1enc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/ffv1enc.c') diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c index 45ab3a39a3..a47a64d391 100644 --- a/libavcodec/ffv1enc.c +++ b/libavcodec/ffv1enc.c @@ -755,6 +755,8 @@ static av_cold int encode_init(AVCodecContext *avctx) s->transparency = desc->nb_components == 4; if (!avctx->bits_per_raw_sample && !s->bits_per_raw_sample) s->bits_per_raw_sample = 8; + else if (!s->bits_per_raw_sample) + s->bits_per_raw_sample = 8; break; case AV_PIX_FMT_RGB32: s->colorspace = 1; -- cgit v1.2.3