mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/ffv1enc: fix assertion failure with unset bits per raw sample
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 749f85496c
)
Fixes ticket #4751.
This commit is contained in:
parent
4afccfdc04
commit
b1863e3d94
|
@ -755,6 +755,8 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||||
s->transparency = desc->nb_components == 4;
|
s->transparency = desc->nb_components == 4;
|
||||||
if (!avctx->bits_per_raw_sample && !s->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;
|
||||||
|
else if (!s->bits_per_raw_sample)
|
||||||
|
s->bits_per_raw_sample = 8;
|
||||||
break;
|
break;
|
||||||
case AV_PIX_FMT_RGB32:
|
case AV_PIX_FMT_RGB32:
|
||||||
s->colorspace = 1;
|
s->colorspace = 1;
|
||||||
|
|
Loading…
Reference in New Issue