After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762999 - Memory leak in qmlglsink
Memory leak in qmlglsink
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.6.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
1.6.4
Depends on:
Blocks:
 
 
Reported: 2016-03-02 17:34 UTC by Sergey Borovkov
Modified: 2016-04-14 17:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix memory leak (673 bytes, patch)
2016-03-02 17:34 UTC, Sergey Borovkov
committed Details | Review

Description Sergey Borovkov 2016-03-02 17:34:00 UTC
Created attachment 322889 [details] [review]
Fix memory leak

There is a memory leak with opengl contexts.
There is 2 context being created:
this->priv->other_context =           gst_gl_context_new_wrapped (this->priv->display, gl_handle, platform, gl_api);
widget->priv->context = gst_gl_context_new (widget->priv->display);

Sink acquires them via qt_item_get_qt_context/qt_item_get_context which do gst_object_ref before returning object.

The attachment fixes the issue on my side. Context get properly deleted and associated thread quits. I am not sure though if my attachment would work in all cases - if window is hidden opengl context would be lost. But this case is already not handled by qmlglsink so I did not make any changes).
Comment 1 Matthew Waters (ystreet00) 2016-03-03 02:19:24 UTC
Pushed a slightly modified version

commit 7981c1cb8608049ac7e78a6c3cb00b62dd7289e0
Author: Sergey Borovkov <sergey.borovkov@wireload.net>
Date:   Tue Mar 1 18:22:37 2016 +0300

    qml: Fix leak of the OpenGL contexts
    
    [Matthew Waters]: add NULL checks before unreffing
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762999