aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorClément Bœsch <u@pkh.me>2015-06-06 12:55:20 +0200
committerClément Bœsch <u@pkh.me>2015-06-06 13:18:28 +0200
commit622ef80e3f5fae400e22aa1417b012d323c04eed (patch)
tree8944345d6cd960655433ff5a20fd34216bcc9c22 /libavcodec
parent0f6118c58169796bdc657794aa88bb72d25b7d98 (diff)
downloadffmpeg-622ef80e3f5fae400e22aa1417b012d323c04eed.tar.gz
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.c2
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;
}