diff options
author | Marton Balint <cus@passwd.hu> | 2013-11-23 20:25:46 +0400 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2013-11-29 00:29:54 +0400 |
commit | 3e396ca8eda473d619ce5ffc1e01950c978194e8 (patch) | |
tree | 93452a17b6ad7adc39f85bbda4bd7d81943f8065 /ffmpeg.c | |
parent | 58010e57b2b9d08db22275a19fb6c3ca7a7d0da7 (diff) |
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>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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++) { |