Commit e6ea4c71 authored by Chiranjeevi Melam's avatar Chiranjeevi Melam Committed by Michael Niedermayer

ffmpeg: Fix minor memleak of input_tmp

parent 94c2478d
...@@ -232,6 +232,8 @@ static AVBitStreamFilterContext *video_bitstream_filters=NULL; ...@@ -232,6 +232,8 @@ static AVBitStreamFilterContext *video_bitstream_filters=NULL;
static AVBitStreamFilterContext *audio_bitstream_filters=NULL; static AVBitStreamFilterContext *audio_bitstream_filters=NULL;
static AVBitStreamFilterContext *subtitle_bitstream_filters=NULL; static AVBitStreamFilterContext *subtitle_bitstream_filters=NULL;
static uint8_t *input_tmp= NULL;
#define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass" #define DEFAULT_PASS_LOGFILENAME_PREFIX "ffmpeg2pass"
typedef struct InputStream { typedef struct InputStream {
...@@ -557,6 +559,8 @@ static int exit_program(int ret) ...@@ -557,6 +559,8 @@ static int exit_program(int ret)
avfilter_uninit(); avfilter_uninit();
#endif #endif
av_freep(&input_tmp);
if (received_sigterm) { if (received_sigterm) {
fprintf(stderr, fprintf(stderr,
"Received signal %d: terminating.\n", "Received signal %d: terminating.\n",
...@@ -840,7 +844,6 @@ need_realloc: ...@@ -840,7 +844,6 @@ need_realloc:
return; return;
ist->is_start=0; ist->is_start=0;
}else{ }else{
static uint8_t *input_tmp= NULL;
input_tmp= av_realloc(input_tmp, byte_delta + size); input_tmp= av_realloc(input_tmp, byte_delta + size);
if(byte_delta > allocated_for_size - size){ if(byte_delta > allocated_for_size - size){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment