[FFmpeg-cvslog] ffmpeg: free threads on error conditions.

Michael Niedermayer git at videolan.org
Fri May 17 23:28:00 CEST 2013


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Wed May 15 01:08:18 2013 +0200| [85277ff9364c976d7d06a03791047e7e406c63c0] | committer: Carl Eugen Hoyos

ffmpeg: free threads on error conditions.

Fixes Ticket2562

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 1a36c756d8959207d3386f03e11c15216abc50b7)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=85277ff9364c976d7d06a03791047e7e406c63c0
---

 ffmpeg.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ffmpeg.c b/ffmpeg.c
index e9837bf..7fe00ab 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]);



More information about the ffmpeg-cvslog mailing list