[FFmpeg-devel] [PATCH 4/6] libopenjpegenc: Use FFMAX()
Michael Niedermayer
michaelni at gmx.at
Fri Nov 18 02:32:54 CET 2011
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/libopenjpegenc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c
index 13b5456..ad9eb1e 100644
--- a/libavcodec/libopenjpegenc.c
+++ b/libavcodec/libopenjpegenc.c
@@ -131,7 +131,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
opj_set_default_encoder_parameters(&ctx->enc_params);
ctx->enc_params.tcp_numlayers = 1;
- ctx->enc_params.tcp_rates[0] = avctx->compression_level > 0 ? avctx->compression_level : 0;
+ ctx->enc_params.tcp_rates[0] = FFMAX(avctx->compression_level, 0);
ctx->enc_params.cp_disto_alloc = 1;
ctx->compress = opj_create_compress(CODEC_J2K);
--
1.7.4.1
More information about the ffmpeg-devel
mailing list