[FFmpeg-cvslog] avcodec/dvdsubdec: Fix off-by-one error

Oliver Fromme git at videolan.org
Fri Jul 4 00:49:58 CEST 2014


ffmpeg | branch: master | Oliver Fromme <oliver at fromme.com> | Thu Jul  3 16:12:12 2014 +0200| [3f0a3e9e127d067c5cf65640a44765c1ddd01622] | committer: 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: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3f0a3e9e127d067c5cf65640a44765c1ddd01622
---

 libavcodec/dvdsubdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 53287bd..6b94292 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) {



More information about the ffmpeg-cvslog mailing list