Commit 533c37db authored by Clément Bœsch's avatar Clément Bœsch

avcodec/snowenc: use av_clip() instead of nested min & max

Note: AVCodecContext.refs is an int field.
parent 622ef80e
...@@ -81,7 +81,7 @@ static av_cold int encode_init(AVCodecContext *avctx) ...@@ -81,7 +81,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
ff_h263_encode_init(&s->m); //mv_penalty ff_h263_encode_init(&s->m); //mv_penalty
s->max_ref_frames = FFMAX(FFMIN(avctx->refs, MAX_REF_FRAMES), 1); s->max_ref_frames = av_clip(avctx->refs, 1, MAX_REF_FRAMES);
if(avctx->flags&CODEC_FLAG_PASS1){ if(avctx->flags&CODEC_FLAG_PASS1){
if(!avctx->stats_out) if(!avctx->stats_out)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment