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>
pull/76/merge
Oliver Fromme 11 years ago committed by Michael Niedermayer
parent a9ce5d92e6
commit 3f0a3e9e12
  1. 2
      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) {

Loading…
Cancel
Save