Browse Source

ffmpeg: do not pass possibly undefined subtitles to sub2video_update

It should not matter for real-life usage, it is just cleaner this way.

Signed-off-by: Marton Balint <cus@passwd.hu>
Reviewed-by: Nicolas George <george@nsup.org>
tags/n2.2-rc1
Marton Balint 11 years ago
parent
commit
3e396ca8ed
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      ffmpeg.c

+ 4
- 1
ffmpeg.c View File

@@ -1822,9 +1822,12 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
FFSWAP(AVSubtitle, subtitle, ist->prev_sub.subtitle);
}

if (!*got_output)
return ret;

sub2video_update(ist, &subtitle);

if (!*got_output || !subtitle.num_rects)
if (!subtitle.num_rects)
return ret;

for (i = 0; i < nb_output_streams; i++) {


Loading…
Cancel
Save