提交 6cbd47bf 编写于 作者: P Paul B Mahol

avcodec/dvdsubdec: ignore h <= 1 case, to properly decode subtitle

Fixes #5825. If h == 1, second decode_rle() fails.

Regression since: 3f0a3e9e.
Signed-off-by: NPaul B Mahol <onemda@gmail.com>
上级 ef42c1de
......@@ -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));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册