Browse Source

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

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

Regression since: 3f0a3e9e12.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
tags/n3.2
Paul B Mahol 8 years ago
parent
commit
6cbd47bf90
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/dvdsubdec.c

+ 1
- 1
libavcodec/dvdsubdec.c View File

@@ -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));


Loading…
Cancel
Save