GNOME Bugzilla – Bug 742006
discoverer: _get_missing_elements_installer_details() is documented to return a copy but doesn't
Last modified: 2014-12-27 13:06:31 UTC
The gst_discoverer_info_get_missing_elements_installer_details() documentation and annotation says that the return value should be freed with g_strfreev(), but actually it's owned by the GstDiscovereInfo object and should definitely not get freed by the caller as well.
Created attachment 293364 [details] [review] Fix documentation that incorrectly says a return value should be freed The gst_discoverer_info_get_missing_elements_installer_details() documentation and annotation says that the return value should be freed with g_strfreev(), but actually it's owned by the GstDiscovereInfo object and should definitely not get freed by the caller as well.
Thanks for the patch, fixed in master (will be picked into 1.4 later): commit 651fa00c12b8b3a1bf1c9a53396ed0cf8863c096 Author: Sam Thursfield <sam@afuera.me.uk> Date: Fri Dec 26 20:48:55 2014 +0000 Fix documentation that incorrectly says a return value should be freed The gst_discoverer_info_get_missing_elements_installer_details() documentation and annotation says that the return value should be freed with g_strfreev(), but actually it's owned by the GstDiscovereInfo object and should definitely not get freed by the caller as well. https://bugzilla.gnome.org/show_bug.cgi?id=742006 I was pondering whether to change it to return a copy instead, but then noticed that all the other bits (taglist, toc, etc.) are also const returns of discoverer-owned structs. I'm a bit concerned about changes being made in discoverer while/after someone is still calling this, but haven't checked the code if we can always assume that all streaming has stopped at the time discoverer notifies results.