GNOME Bugzilla – Bug 515697
[multifile] Several memory leaks exposed by unit test
Last modified: 2008-02-11 14:01:20 UTC
Hi, the attached patch fixes several memory leaks that are exposed by the unit test. For example multifilesrc leaks everything it reads :)
Created attachment 104893 [details] [review] multifile.patch
Also, why does it use g_file_get_contents()? This is a bit annoying if trying to read files that are rather large.
> Also, why does it use g_file_get_contents()? This is a bit annoying if trying > to read files that are rather large. It's meant to produce one buffer per file and is supposed to be used only with files that easily fit into allocated memory. Using mmap() here would entail the same problems that we've been seeing with filesrc, meaning that it's not really an option because we can't do decent error handling: if something goes wrong it might just take the entire app down.
2008-02-11 Sebastian Dröge <slomo@circular-chaos.org> * gst/multifile/gstmultifilesrc.c: (gst_multi_file_src_create): * tests/check/elements/multifile.c: (GST_START_TEST): Close some memory leaks spotted by the unit test. Fixes bug #515697.