GNOME Bugzilla – Bug 763973
qtdemux: Fix qtdemux memory leak
Last modified: 2016-03-25 10:05:10 UTC
qtdemux isn't being freed if we can't find right index in src_convert function. So, we should free it when it can't find right index.
Created attachment 324410 [details] [review] qtdemux: Fix qtdemx memory leak
Review of attachment 324410 [details] [review]: Instead pass qtdemux (aka parent) as a parameter into gst_qtdemux_src_convert() from gst_qtdemux_handle_src_query().
@slomo I'm sorry about that I don't understand for your comment. As you know, qtdemux is freed in goto statement in src_convert function. could you please explain more detail?
This calls _convert(): https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/isomp4/qtdemux.c?id=d8fb7a9c96b108814beeaa0e63f818d4648c7fe9#n804 It has qtdemux/parent there already. You could just pass that as an argument to _convert().
(In reply to Sebastian Dröge (slomo) from comment #4) > This calls _convert(): > https://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/gst/isomp4/ > qtdemux.c?id=d8fb7a9c96b108814beeaa0e63f818d4648c7fe9#n804 > > It has qtdemux/parent there already. You could just pass that as an argument > to _convert(). Thanks for your reply. I'll upload it!
Created attachment 324649 [details] [review] qtdemux: Fix memory leak
Created attachment 324650 [details] [review] qtdemux: Fix memory leak
commit 206e24855a8cc6e8da946da6239f8d4a83b28718 Author: Jimmy Ohn <yongjin.ohn@lge.com> Date: Thu Mar 24 15:14:23 2016 +0900 qtdemux: Fix qtdemux memory leak in src_convert function If we don't find the index of the sample correctly in src_convert function, we have to unref about the qtdemux before returning value. So, I have modify it about instead pass qtdemux as a parameter into src_convert function. https://bugzilla.gnome.org/show_bug.cgi?id=763973