aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-15 01:08:18 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-05-17 23:23:57 +0200
commit85277ff9364c976d7d06a03791047e7e406c63c0 (patch)
tree4f80235fb109ab53912b8532ec8ce88f215092d4
parentf544553c2993163da1797d01ee79d9c3e5f607b6 (diff)
downloadffmpeg-85277ff9364c976d7d06a03791047e7e406c63c0.tar.gz
ffmpeg: free threads on error conditions.
Fixes Ticket2562 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 1a36c756d8959207d3386f03e11c15216abc50b7)
-rw-r--r--ffmpeg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index e9837bf83a..7fe00abe80 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -152,6 +152,8 @@ static struct termios oldtty;
static int restore_tty;
#endif
+static void free_input_threads(void);
+
/* sub2video hack:
Convert subtitles to video with alpha to insert them in filter graphs.
@@ -441,6 +443,9 @@ static void exit_program(void)
av_freep(&output_streams[i]->logfile_prefix);
av_freep(&output_streams[i]);
}
+#if HAVE_PTHREADS
+ free_input_threads();
+#endif
for (i = 0; i < nb_input_files; i++) {
avformat_close_input(&input_files[i]->ctx);
av_freep(&input_files[i]);