---
libavcodec/mpegvideo.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index b0ef63f..f3212da 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1698,13 +1698,13 @@ int MPV_lowest_referenced_row(MpegEncContext *s, int dir)
switch (s->mv_type) {
case MV_TYPE_16X16:
- off = (s->mv[dir][0][1] + 16) >> 5;
+ off = (s->mv[dir][0][1] + 31) >> 5;
break;
default:
goto unhandled;
}
- return s->mb_y + off;
+ return FFMIN(s->mb_y + off, s->mb_height-1);
unhandled:
return s->mb_height-1;
}
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc