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>
This commit is contained in:
Oliver Fromme 2014-07-03 16:12:12 +02:00 committed by Michael Niedermayer
parent a9ce5d92e6
commit 3f0a3e9e12
1 changed files with 1 additions and 1 deletions

View File

@ -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) {