summaryrefslogtreecommitdiff
path: root/libavcodec/dvdsubdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-09-17 23:18:27 +0200
committerPaul B Mahol <onemda@gmail.com>2016-09-18 15:22:48 +0200
commit6cbd47bf90d38aadba0f0cea4493c23ece77ac8f (patch)
tree808dde1dc7485c112fb35af882f955763707491b /libavcodec/dvdsubdec.c
parentef42c1de2b430ec90ed9931ba823e154714368bc (diff)
downloadffmpeg-6cbd47bf90d38aadba0f0cea4493c23ece77ac8f.tar.gz
avcodec/dvdsubdec: ignore h <= 1 case, to properly decode subtitle
Fixes #5825. If h == 1, second decode_rle() fails. Regression since: 3f0a3e9e127d067c5cf65640a44765c1ddd01622. Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/dvdsubdec.c')
-rw-r--r--libavcodec/dvdsubdec.c2
1 files changed, 1 insertions, 1 deletions
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));