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
1633 1633
1634 if (!*got_output) {1634 if (!*got_output) {
1635 /* no audio frame */1635 /* no audio frame */
1636 av_freep(&decoded_frame);
1636 return ret;1637 return ret;
1637 }1638 }
1638 1639
@@ -1700,6 +1701,7 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) · 61 unmodified lines
1700 av_log(NULL, AV_LOG_FATAL,1701 av_log(NULL, AV_LOG_FATAL,
1701 "Audio volume adjustment on sample format %s is not supported.\n",1702 "Audio volume adjustment on sample format %s is not supported.\n",
1702 av_get_sample_fmt_name(ist->st->codec->sample_fmt));1703 av_get_sample_fmt_name(ist->st->codec->sample_fmt));
1704 av_freep(&decoded_frame);
1703 exit_program(1);1705 exit_program(1);
1704 }1706 }
1705 }1707 }
@@ -1713,6 +1715,8 @@ static int transcode_audio(InputStream *ist, AVPacket *pkt, int *got_output) · 7 unmodified lines
1713 continue;1715 continue;
1714 do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame);1716 do_audio_out(output_files[ost->file_index].ctx, ost, ist, decoded_frame);
1715 }1717 }
1718
1719 av_freep(&decoded_frame);
1716 return ret;1720 return ret;
1717}1721}
1718 1722

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