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 744977 - glvideomixer: severe memory leak
glvideomixer: severe memory leak
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.5.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2015-02-22 18:37 UTC by Vasilis Liaskovitis
Modified: 2015-02-23 16:44 UTC
See Also:
GNOME target: ---
GNOME version: ---

fix transfer pbo memory leak (728 bytes, patch)
2015-02-23 15:19 UTC, Vasilis Liaskovitis
committed Details | Review

Description Vasilis Liaskovitis 2015-02-22 18:37:26 UTC
glvideomixer leaks memory when feeding into a capsfilter, or when feeding into a non-gl based sink. Pipeline eats up most of system memory eventually (as reported by e.g. vmstat / free).

gst-launch-1.0 uridecodebin  uri=file:///opt/Videos/test.avi ! glvideomixer ! video/x-raw, width=1280, height=720 ! glimagesink

GST_DEBUG=4 log:

gst-launch-1.0 uridecodebin  uri=file:///opt/Videos/test.avi ! glvideomixer ! video/x-raw, width=1280, height=720 ! autovideosink
where autovideosink defaults to xvimagesink on this platform (i.e. not glimagesink).

GST_DEBUG=4 log:

Leak also happens without a caps element, as long as glvideomixer feeds into non-gl sink (autovideosink): 

gst-launch-1.0 uridecodebin  uri=file:///opt/Videos/test.avi !  glvideomixer   ! autovideosink

GST_DEBUG=4 log:
in this case memory usage increases at a slower rate than previous pipelines, but is still visible.

Pipeline "gst-launch-1.0 uridecodebin  uri=file:///opt/Videos/test.avi ! glvideomixer ! glimagesink" does not appear to leak memory. Identical pipelines with compositor instead of glviodemixer element also do not leak.

There are a lot of the following debug messages in the leaking cases:
"glmixer gstglmixer.c:1148:gst_gl_mixer_process_textures: Output Buffer does not contain correct memory, attempting to wrap for download"
Perhaps the leaks and extra memory allocations happen only when downloading / uploading some pbo or other object due to inappropriate memory type?

Tested with master repos from 22/2/2015
Comment 1 Topolsky 2015-02-23 08:58:26 UTC
Tested the given pipelines from Vasilis - the results are the same as described. The memory leak happens using gstreamer from git master from 10/2/2015

The memory leak occures for me also with videotestsrc

gst-launch-1.0 videotestsrc ! glvideomixer ! video/x-raw, width=1280, height=720 ! ximagesink

The leak happend also without caps but its much slower:

gst-launch-1.0 videotestsrc ! glvideomixer ! ximagesink
Comment 2 Vasilis Liaskovitis 2015-02-23 15:19:22 UTC
Created attachment 297675 [details] [review]
fix transfer pbo memory leak
Comment 3 Sebastian Dröge (slomo) 2015-02-23 16:43:43 UTC
commit c55689ad1681fa7807b32f5e179700f537dff497
Author: Vasilis Liaskovitis <>
Date:   Mon Feb 23 16:13:31 2015 +0100

    glmemory: Fix transfer_pbo memory leak
Comment 4 Sebastian Dröge (slomo) 2015-02-23 16:44:09 UTC
Comment on attachment 297675 [details] [review]
fix transfer pbo memory leak

Thanks for the patch!