History

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

Justin Ruggles committed 14 years ago

Commit 110d2af1 parent b41995d1 file · +4 −0Browse files

Unified · Split

avconv.c+4−0
@@ -1633,6 +1633,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) · 1632 unmodified lines
16331633
16341634 if (!*got_output) {
16351635 /* no audio frame */
1636+ av_freep(&decoded_frame);
16361637 return ret;
16371638 }
16381639
@@ -1700,6 +1701,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) · 61 unmodified lines
17001701 av_log(NULL, AV_LOG_FATAL,
17011702 "Audio volume adjustment on sample format %s is not supported.\n",
17021703 av_get_sample_fmt_name(ist->st->codec->sample_fmt));
1704+ av_freep(&decoded_frame);
17031705 exit_program(1);
17041706 }
17051707 }
@@ -1713,6 +1715,8 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) · 7 unmodified lines
17131715 continue;
17141716 do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame);
17151717 }
1718+
1719+ av_freep(&decoded_frame);
17161720 return ret;
17171721 }
17181722

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t