[Ffmpeg-devel] Re: Memory leaks with some codecs... (again)
Wolfram Gloger
wmglo
Mon Feb 6 11:33:32 CET 2006
Hi,
> That's NO candidate for av_mallocz_static. Instead, the codec context must
> be freed when no longer used (i.e. before the corresponding AVStream is
> freed).
Here's a patch. It might be better to have an
av_free_format_context() which does the same as the last few lines in
output_example.c..
Regards,
Wolfram.
--- ffmpeg/output_example.c Tue Jan 31 00:33:16 2006
+++ ffmpeg-test/output_example.c Mon Feb 6 11:25:05 2006
@@ -512,6 +512,7 @@
/* free the streams */
for(i = 0; i < oc->nb_streams; i++) {
+ av_free(oc->streams[i]->codec);
av_freep(&oc->streams[i]);
}
More information about the ffmpeg-devel
mailing list