[Bug 736758] Memory leak when switching between MPEG2 TS streams

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Sep 29 06:28:37 PDT 2014


https://bugzilla.gnome.org/show_bug.cgi?id=736758
  GStreamer | qt-gstreamer | git

--- Comment #1 from Benjamin Federau <benjamin.federau at basyskom.com> 2014-09-29 13:28:31 UTC ---
It seems that I have found the memory leak. There is a missing
gst_buffer_unref() in the destructor of VideoMaterial (qtquick2videosink -
elements/gstqtvideosink/painters/videomaterial.cpp).

After setting the pipeline to state NULL the current VideoMaterial (with the
frame data) will be deleted and the QSGMaterial of the current QSGVideoNode is
set to QSGFlatColorMaterial. In the process of deleting the VideoMaterial there
is still one reference on the GstBuffer frame data. As soon the playback starts
again and a new VideoMaterial is created new memory is allocated and the old
was not freed.

Adding a gst_buffer_ref() ind VideoMaterial::~Videomaterial frees the buffer
correctly.


B.t.w. the above change from g_clear_pointer() to gst_buffer_unref() in the
basedelegate.cpp leads to a synchronization issue when switch between streams
and on playback stop the last frame content will be shown instead of the black
rectangle. (This was an observation on my i.MX6 hardware)

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list