diff mbox

[FFmpeg-devel] avcodec/dvdsubdec: ignore h <= 1 case, to properly decode subtitle

Message ID 1474147353-19972-1-git-send-email-onemda@gmail.com
State Accepted
Commit 6cbd47bf90d38aadba0f0cea4493c23ece77ac8f
Headers show

Commit Message

Paul B Mahol Sept. 17, 2016, 9:22 p.m. UTC
Fixes #5825.

Regression since: 3f0a3e9e127d067c5cf65640a44765c1ddd01622.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
---
 libavcodec/dvdsubdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 19f25f0..b81b481 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -368,7 +368,7 @@  static int decode_dvd_subtitles(DVDSubContext *ctx, AVSubtitle *sub_header,
             h = y2 - y1 + 1;
             if (h < 0)
                 h = 0;
-            if (w > 0 && h > 0) {
+            if (w > 0 && h > 1) {
                 reset_rects(sub_header);
 
                 sub_header->rects = av_mallocz(sizeof(*sub_header->rects));