lclenc: make compression level user selectable

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2012-11-02 21:54:44 +00:00
parent 25b7aa980b
commit f58f600c68
3 changed files with 5 additions and 4 deletions

View file

@ -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;