aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2015-06-06 12:56:57 +0200
committerClément Bœsch <u@pkh.me>2015-06-06 13:18:28 +0200
commit533c37db8ddba7e698f79b7d2e5918f18a7b39e2 (patch)
tree2e32d9999d63967cb88cf907742c4a198252e56c
parent622ef80e3f5fae400e22aa1417b012d323c04eed (diff)
downloadffmpeg-533c37db8ddba7e698f79b7d2e5918f18a7b39e2.tar.gz
avcodec/snowenc: use av_clip() instead of nested min & max
Note: AVCodecContext.refs is an int field.
-rw-r--r--libavcodec/snowenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c
index 88965e4036..5c5cc66505 100644
--- a/libavcodec/snowenc.c
+++ b/libavcodec/snowenc.c
@@ -81,7 +81,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
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->stats_out)