Commit 622ef80e authored by Clément Bœsch's avatar Clément Bœsch

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

Note: MpegEncContext.mb_{y,height} are int fields, as well as local off
variable.
parent 0f6118c5
......@@ -2776,7 +2776,7 @@ int ff_mpv_lowest_referenced_row(MpegEncContext *s, int dir)
off = ((FFMAX(-my_min, my_max)<<qpel_shift) + 63) >> 6;
return FFMIN(FFMAX(s->mb_y + off, 0), s->mb_height-1);
return av_clip(s->mb_y + off, 0, s->mb_height - 1);
unhandled:
return s->mb_height-1;
}
......
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