aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-26 21:18:42 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-26 21:23:14 +0200
commit4b8a8194964415022667099b502e60989f4d3134 (patch)
treef554c896b5dc47f73fc8910822cf07bdf0e4924b /libavcodec/ffv1enc.c
parent81e40c26e176a6bcd91d1bfbf9e1820d89bb493b (diff)
downloadffmpeg-4b8a8194964415022667099b502e60989f4d3134.tar.gz
avcodec/ffv1enc: set bits_per_raw_sample for 8bit based formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 805158eb04..af727a5cd5 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -753,15 +753,21 @@ 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)
+ s->bits_per_raw_sample = 8;
break;
case AV_PIX_FMT_RGB32:
s->colorspace = 1;
s->transparency = 1;
s->chroma_planes = 1;
+ if (!avctx->bits_per_raw_sample)
+ s->bits_per_raw_sample = 8;
break;
case AV_PIX_FMT_0RGB32:
s->colorspace = 1;
s->chroma_planes = 1;
+ if (!avctx->bits_per_raw_sample)
+ s->bits_per_raw_sample = 8;
break;
case AV_PIX_FMT_GBRP9:
if (!avctx->bits_per_raw_sample)