Browse Source

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>
tags/n2.3
Oliver Fromme Michael Niedermayer 11 years ago
parent
commit
3f0a3e9e12
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/dvdsubdec.c

+ 1
- 1
libavcodec/dvdsubdec.c 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) {


Loading…
Cancel
Save