Browse Source

ffmpeg: free threads on error conditions.

Fixes Ticket2562

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.0
Michael Niedermayer 12 years ago
parent
commit
1a36c756d8
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      ffmpeg.c

+ 5
- 0
ffmpeg.c View File

@@ -162,6 +162,8 @@ static struct termios oldtty;
static int restore_tty; static int restore_tty;
#endif #endif


static void free_input_threads(void);



/* sub2video hack: /* sub2video hack:
Convert subtitles to video with alpha to insert them in filter graphs. 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]->logfile_prefix);
av_freep(&output_streams[i]); av_freep(&output_streams[i]);
} }
#if HAVE_PTHREADS
free_input_threads();
#endif
for (i = 0; i < nb_input_files; i++) { for (i = 0; i < nb_input_files; i++) {
avformat_close_input(&input_files[i]->ctx); avformat_close_input(&input_files[i]->ctx);
av_freep(&input_files[i]); av_freep(&input_files[i]);


Loading…
Cancel
Save