diff options
author | Paul B Mahol <onemda@gmail.com> | 2012-11-02 21:54:44 +0000 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2012-11-02 22:14:14 +0000 |
commit | f58f600c6899bcfbc359b7db7b9d2fc50ae6961d (patch) | |
tree | 01a4692904ed76144a5cfa1eda3530be01b69286 /libavcodec/lclenc.c | |
parent | 25b7aa980bb8ecc6de085adf7d6b8e68a44bcbd4 (diff) | |
download | ffmpeg-f58f600c6899bcfbc359b7db7b9d2fc50ae6961d.tar.gz |
lclenc: make compression level user selectable
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/lclenc.c')
-rw-r--r-- | libavcodec/lclenc.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/lclenc.c b/libavcodec/lclenc.c index 1702136172..09beb98c86 100644 --- a/libavcodec/lclenc.c +++ b/libavcodec/lclenc.c @@ -140,8 +140,9 @@ static av_cold int encode_init(AVCodecContext *avctx) avctx->extradata= av_mallocz(8); avctx->coded_frame= &c->pic; - // Will be user settable someday - c->compression = 6; + c->compression = avctx->compression_level == FF_COMPRESSION_DEFAULT ? + COMP_ZLIB_NORMAL : + av_clip(avctx->compression_level, 0, 9); c->flags = 0; c->imgtype = IMGTYPE_RGB24; avctx->bits_per_coded_sample= 24; |