diff options
author | Paul B Mahol <onemda@gmail.com> | 2020-08-03 22:18:47 +0200 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2020-08-03 22:22:08 +0200 |
commit | d2b9cb11329107707125cffd02cbc238175a9f74 (patch) | |
tree | ba21267435047156cc81c5b8c471b4dbead3c0ee /libavcodec | |
parent | 65516b2cd0d8399cb1dac39d9e63759bd5a30db7 (diff) | |
download | ffmpeg-d2b9cb11329107707125cffd02cbc238175a9f74.tar.gz |
avcodec/cfhdenc: fix setting default compression level
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/cfhdenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/cfhdenc.c b/libavcodec/cfhdenc.c index 911eee4e3e..10cf7c03ac 100644 --- a/libavcodec/cfhdenc.c +++ b/libavcodec/cfhdenc.c @@ -242,10 +242,11 @@ static av_cold int cfhd_encode_init(AVCodecContext *avctx) } 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 = av_clip(avctx->compression_level, 0, 10); + s->compression = av_clip(s->compression, 0, 10); for (int i = 0; i < s->planes; i++) { int w8, h8, w4, h4, w2, h2; |