aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorIlya Basin <basinilya@gmail.com>2013-12-16 13:05:51 +0400
committerMichael Niedermayer <michaelni@gmx.at>2013-12-21 12:20:44 +0100
commitb6714fa077d9d6ba8bc0f46a84c9398d413b8c22 (patch)
treeb01f09ec4916eea28725b24839b6f84a581fa7ce /doc
parent8baaa924bd42977c1f5c4aae0fe24985afb52a87 (diff)
downloadffmpeg-b6714fa077d9d6ba8bc0f46a84c9398d413b8c22.tar.gz
examples/muxing: fix av_frame_free() not called when got_packet is false
Hi list! Since my last patch (fix 2 memleaks in doc/examples/muxing.c) I found more problems to fix. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/muxing.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 9ad6e28281..5f716c22a4 100644
--- a/doc/examples/muxing.c
+++ b/doc/examples/muxing.c
@@ -269,7 +269,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
}
if (!got_packet)
- return;
+ goto freeframe;
pkt.stream_index = st->index;
@@ -280,6 +280,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
av_err2str(ret));
exit(1);
}
+freeframe:
av_frame_free(&frame);
}