mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avcodec/snowenc: use av_clip() instead of nested min & max
Note: AVCodecContext.refs is an int field.
This commit is contained in:
parent
622ef80e3f
commit
533c37db8d
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user