From 3f0a3e9e127d067c5cf65640a44765c1ddd01622 Mon Sep 17 00:00:00 2001 From: Oliver Fromme Date: Thu, 3 Jul 2014 16:12:12 +0200 Subject: [PATCH] avcodec/dvdsubdec: Fix off-by-one error Fix an off-by-one error that causes the height of decoded subtitles to be too small, thus cutting off the lowest row of pixels. Signed-off-by: Michael Niedermayer --- libavcodec/dvdsubdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) {