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>
pull/49/head
Marton Balint 11 years ago
parent 58010e57b2
commit 3e396ca8ed
  1. 5
      ffmpeg.c

@ -1822,9 +1822,12 @@ static int transcode_subtitles(InputStream *ist, AVPacket *pkt, int *got_output)
FFSWAP(AVSubtitle, subtitle, ist->prev_sub.subtitle); FFSWAP(AVSubtitle, subtitle, ist->prev_sub.subtitle);
} }
if (!*got_output)
return ret;
sub2video_update(ist, &subtitle); sub2video_update(ist, &subtitle);
if (!*got_output || !subtitle.num_rects) if (!subtitle.num_rects)
return ret; return ret;
for (i = 0; i < nb_output_streams; i++) { for (i = 0; i < nb_output_streams; i++) {

Loading…
Cancel
Save