summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-11-23 17:25:46 +0100
committerMarton Balint <cus@passwd.hu>2013-11-28 21:29:54 +0100
commit3e396ca8eda473d619ce5ffc1e01950c978194e8 (patch)
tree93452a17b6ad7adc39f85bbda4bd7d81943f8065 /ffmpeg.c
parent58010e57b2b9d08db22275a19fb6c3ca7a7d0da7 (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.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 62a548761c..bbd30190cb 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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++) {