Commit 3f0a3e9e authored by Oliver Fromme's avatar Oliver Fromme Committed by Michael Niedermayer

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: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent a9ce5d92
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment