diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c index 19f25f0e60..b81b481e43 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));