From b1863e3d948474cfca995c34209912f3c8a3a753 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 20 Jul 2015 02:10:04 +0200 Subject: [PATCH] avcodec/ffv1enc: fix assertion failure with unset bits per raw sample Signed-off-by: Michael Niedermayer (cherry picked from commit 749f85496ccff345ec811976ce45ec9e1900e9a8) Fixes ticket #4751. --- libavcodec/ffv1enc.c | 2 ++ 1 file changed, 2 insertions(+) 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;