]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/dvdsubdec.c
avcodec/dvdsubdec: Fix off-by-one error
[ffmpeg] / libavcodec / dvdsubdec.c
index 53287bd1226552daad0e8835ec83fa2bcccc5e6e..6b94292c0451e6ef52d90a3359cc5bb95d899b7b 100644 (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) {