diff options
author | Clément Bœsch <u@pkh.me> | 2015-06-06 13:55:20 +0300 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2015-06-06 14:18:28 +0300 |
commit | 622ef80e3f5fae400e22aa1417b012d323c04eed (patch) | |
tree | 8944345d6cd960655433ff5a20fd34216bcc9c22 /libavcodec | |
parent | 0f6118c58169796bdc657794aa88bb72d25b7d98 (diff) |
avcodec/mpegvideo: use av_clip() instead of nested min & max
Note: MpegEncContext.mb_{y,height} are int fields, as well as local off
variable.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mpegvideo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index d4a84d43e3..57d9620062 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -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; } |