summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-15 01:08:18 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-15 01:28:59 +0200
commit1a36c756d8959207d3386f03e11c15216abc50b7 (patch)
tree95d5e0ee0ef7d30488c805755bfa8c2d2810197a /ffmpeg.c
parent7b43120c7c1e56a5f1d3d9165134ee4aac253f0d (diff)
ffmpeg: free threads on error conditions.
Fixes Ticket2562 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 15c2a29371..785c334795 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -162,6 +162,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.
@@ -474,6 +476,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]);