Commit 110d2af2 authored by Justin Ruggles's avatar Justin Ruggles

avconv: fix memleaks due to not freeing the AVFrame for audio

parent b41995d2
...@@ -1633,6 +1633,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) ...@@ -1633,6 +1633,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
if (!*got_output) { if (!*got_output) {
/* no audio frame */ /* no audio frame */
av_freep(&decoded_frame);
return ret; return ret;
} }
...@@ -1700,6 +1701,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) ...@@ -1700,6 +1701,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
av_log(NULL, AV_LOG_FATAL, av_log(NULL, AV_LOG_FATAL,
"Audio volume adjustment on sample format %s is not supported.\n", "Audio volume adjustment on sample format %s is not supported.\n",
av_get_sample_fmt_name(ist->st->codec->sample_fmt)); av_get_sample_fmt_name(ist->st->codec->sample_fmt));
av_freep(&decoded_frame);
exit_program(1); exit_program(1);
} }
} }
...@@ -1713,6 +1715,8 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) ...@@ -1713,6 +1715,8 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
continue; continue;
do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame); do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame);
} }
av_freep(&decoded_frame);
return ret; return ret;
} }
......
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