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 768762 - tests: qtmux and matroskamux reported as leaking by the leaks tracer
tests: qtmux and matroskamux reported as leaking by the leaks tracer
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal minor
: 1.11.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 767856
 
 
Reported: 2016-07-13 09:30 UTC by Guillaume Desmottes
Modified: 2017-02-21 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
caps: handle buffer owned by leaked caps (3.32 KB, patch)
2016-07-13 09:30 UTC, Guillaume Desmottes
rejected Details | Review
{matroska,qt}mux: don't set buffers in template caps (7.60 KB, patch)
2017-02-07 17:06 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2016-07-13 09:30:12 UTC
The element 'elements/qtmux' and 'elements/matroskamux' tests are reported as leaking by the leaks tracer.
That's because they have GstBuffer in their template caps ('streamheader', 'codec_data'). The template caps are leaked hence are the buffers.

One way to fix this would be to mark the buffers owned by such caps as leaked as well (cf attached patch) but we did not go for this option when we introduced the LEAKED flag (see https://bugzilla.gnome.org/show_bug.cgi?id=766008#c16 ).

According to https://bugzilla.gnome.org/show_bug.cgi?id=766008#c20 the tests should be change to not use such caps but I don't know the details.
Comment 1 Guillaume Desmottes 2016-07-13 09:30:37 UTC
Created attachment 331390 [details] [review]
caps: handle buffer owned by leaked caps
Comment 2 Guillaume Desmottes 2017-02-07 10:44:31 UTC
Some guidance about how to solve this would be welcome.

Those two tests are the last ones reported as leaking (core, base, good, ugly). Solving this bug would bring us a step closer of using the leaks detector in our QA tools (bug #767856).
Comment 3 Sebastian Dröge (slomo) 2017-02-07 11:41:39 UTC
The template caps shouldn't really contain buffers, I would suggest that you only add them to the actual caps later.
Comment 4 Guillaume Desmottes 2017-02-07 17:06:44 UTC
(In reply to Sebastian Dröge (slomo) from comment #3)
> The template caps shouldn't really contain buffers, I would suggest that you
> only add them to the actual caps later.

Indeed, that solves it. Thanks! :)
Comment 5 Guillaume Desmottes 2017-02-07 17:06:53 UTC
Created attachment 345126 [details] [review]
{matroska,qt}mux: don't set buffers in template caps

streamheader and codec_data buffers fields are only meant to be in the
negotiated caps, not the template ones.

Fix leaks of those buffers as template caps are static.
Comment 6 Tim-Philipp Müller 2017-02-21 15:48:48 UTC
Thanks for the patch!


commit 0f719af3077b788f9e0d87066fdcfd19c36eca49
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Tue Feb 7 17:27:56 2017 +0100

    tests: matroskamux, qtmux: don't add codec_data buffers to template caps
    
    streamheader and codec_data buffers fields are only meant to be
    in the negotiated caps, not the template caps.
    
    Fixes false-positive leaks of those buffers detected by the leaks
    tracer, as template caps are static, and we decided to not include
    code in gstreamer core to handle this unusual case of template caps
    having buffers in them.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768762