Commit 3e396ca8 authored by Marton Balint's avatar Marton Balint

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: 's avatarMarton Balint <cus@passwd.hu>
Reviewed-by: 's avatarNicolas George <george@nsup.org>
parent 58010e57
......@@ -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++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment