diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 53287bd122..6b94292c04 100644 --- a/libavcodec/dvdsubdec.c +++ b/libavcodec/dvdsubdec.c @@ -345,7 +345,7 @@ static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header, w = x2 - x1 + 1; if (w < 0) w = 0; - h = y2 - y1; + h = y2 - y1 + 1; if (h < 0) h = 0; if (w > 0 && h > 0) {