aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-08-03 22:18:47 +0200
committerPaul B Mahol <onemda@gmail.com>2020-08-03 22:22:08 +0200
commitd2b9cb11329107707125cffd02cbc238175a9f74 (patch)
treeba21267435047156cc81c5b8c471b4dbead3c0ee /libavcodec
parent65516b2cd0d8399cb1dac39d9e63759bd5a30db7 (diff)
downloadffmpeg-d2b9cb11329107707125cffd02cbc238175a9f74.tar.gz
avcodec/cfhdenc: fix setting default compression level
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/cfhdenc.c5
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;