diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2011-12-05 10:36:54 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2011-12-05 10:53:29 -0500 |
commit | 110d2af28e186d5ed120942f8b3d51acda59e341 (patch) | |
tree | b349cb1fee0a3c74e643807537058b853e40722e | |
parent | b41995d20e15ca963c72d4f715ac46c5b15bfe80 (diff) | |
download | ffmpeg-110d2af28e186d5ed120942f8b3d51acda59e341.tar.gz |
avconv: fix memleaks due to not freeing the AVFrame for audio
-rw-r--r-- | avconv.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1633,6 +1633,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) if (!*got_output) { /* no audio frame */ + av_freep(&decoded_frame); return ret; } @@ -1700,6 +1701,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) av_log(NULL, AV_LOG_FATAL, "Audio volume adjustment on sample format %s is not supported.\n", av_get_sample_fmt_name(ist->st->codec->sample_fmt)); + av_freep(&decoded_frame); exit_program(1); } } @@ -1713,6 +1715,8 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) continue; do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame); } + + av_freep(&decoded_frame); return ret; } |