aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Fromme <oliver@fromme.com>2014-07-03 16:12:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-07-04 00:32:43 +0200
commit3f0a3e9e127d067c5cf65640a44765c1ddd01622 (patch)
treea7debbc2997b804bafc3f695a77661cf81d0fc10
parenta9ce5d92e6148cbf9016052839159059905320ef (diff)
downloadffmpeg-3f0a3e9e127d067c5cf65640a44765c1ddd01622.tar.gz
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 <michaelni@gmx.at>
-rw-r--r--libavcodec/dvdsubdec.c2
1 files changed, 1 insertions, 1 deletions
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) {