1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-15 14:13:16 +02:00

avcodec/cfhdenc: fix setting default compression level

This commit is contained in:
Paul B Mahol
2020-08-03 22:18:47 +02:00
parent 65516b2cd0
commit d2b9cb1132

View File

@@ -242,10 +242,11 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx)
} }
s->planes = av_pix_fmt_count_planes(avctx->pix_fmt); s->planes = av_pix_fmt_count_planes(avctx->pix_fmt);
s->compression = avctx->compression_level;
if (avctx->compression_level == FF_COMPRESSION_DEFAULT) if (s->compression == FF_COMPRESSION_DEFAULT)
s->compression = 2; s->compression = 2;
s->compression = av_clip(avctx->compression_level, 0, 10); s->compression = av_clip(s->compression, 0, 10);
for (int i = 0; i < s->planes; i++) { for (int i = 0; i < s->planes; i++) {
int w8, h8, w4, h4, w2, h2; int w8, h8, w4, h4, w2, h2;