[FFmpeg-devel] [PATCH 4/6] libopenjpegenc: Use FFMAX()
Michael Bradshaw
mbradshaw at sorensonmedia.com
Fri Nov 18 22:59:06 CET 2011
On Thu, Nov 17, 2011 at 6:32 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> 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
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
Applied.
More information about the ffmpeg-devel
mailing list