[FFmpeg-cvslog] examples/muxing: fix av_frame_free() not called when got_packet is false
Ilya Basin
git at videolan.org
Sat Dec 21 12:33:53 CET 2013
ffmpeg | branch: master | Ilya Basin <basinilya at gmail.com> | Mon Dec 16 13:05:51 2013 +0400| [b6714fa077d9d6ba8bc0f46a84c9398d413b8c22] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b6714fa077d9d6ba8bc0f46a84c9398d413b8c22
---
doc/examples/muxing.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/examples/muxing.c b/doc/examples/muxing.c
index 9ad6e28..5f716c2 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);
}
More information about the ffmpeg-cvslog
mailing list