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 768776 - message: fix annotation of message parse API returning objects
message: fix annotation of message parse API returning objects
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.9.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-13 14:05 UTC by Guillaume Desmottes
Modified: 2016-07-15 15:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
message: fix annotation of parse_device_{added,removed} (2.35 KB, patch)
2016-07-13 14:05 UTC, Guillaume Desmottes
committed Details | Review
message: fix annotation of parse_stream_{collection,streams_selected} (1.55 KB, patch)
2016-07-13 14:05 UTC, Guillaume Desmottes
committed Details | Review
tools: fix device leaks in gst-device-monitor (1.11 KB, patch)
2016-07-13 14:06 UTC, Guillaume Desmottes
committed Details | Review
playback3: fix leaks of collection returned by message parse API (2.88 KB, patch)
2016-07-13 14:06 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2016-07-13 14:05:10 UTC
.
Comment 1 Guillaume Desmottes 2016-07-13 14:05:43 UTC
Created attachment 331410 [details] [review]
message: fix annotation of parse_device_{added,removed}

gst_structure_id_get() returns a new reference so the returned device is
actually (transfer full).

The code using this API was already correct but the code example in
comments was not.
Comment 2 Guillaume Desmottes 2016-07-13 14:05:48 UTC
Created attachment 331411 [details] [review]
message: fix annotation of parse_stream_{collection,streams_selected}

gst_structure_id_get() returns a new reference so the returned object is
actually (transfer full).

The unit tests was already unreffing the objects.
Comment 3 Guillaume Desmottes 2016-07-13 14:06:03 UTC
Created attachment 331413 [details] [review]
tools: fix device leaks in gst-device-monitor

gst_message_parse_device_{added,removed} is actually returning a new ref
on the device.
Comment 4 Guillaume Desmottes 2016-07-13 14:06:14 UTC
Created attachment 331414 [details] [review]
playback3: fix leaks of collection returned by message parse API

gst_message_parse_stream_collection() and
gst_message_parse_streams_selected() actually return a reffed
GstStreamCollection.
Comment 5 Tim-Philipp Müller 2016-07-15 12:12:03 UTC
commit 31ef1051100f1c11a038a9dd1c32753eaa8efde3
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Wed Jul 13 15:43:21 2016 +0200

    message: fix annotation of parse_stream_{collection,streams_selected}
    
    gst_structure_id_get() returns a new reference so the returned object is
    actually (transfer full).
    
    The unit tests was already unreffing the objects.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768776

commit 514beb7d60e90f23c63a02dd2cae1af619d204b0
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Wed Jul 13 15:43:21 2016 +0200

    message: fix annotation of parse_device_{added,removed}
    
    gst_structure_id_get() returns a new reference so the returned device is
    actually (transfer full).
    
    The code using this API was already correct but the code example in
    comments was not.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768776

commit a3c47a0754bfaaa4ebec94d4ea9e397c923b1cba
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Wed Jul 13 15:45:33 2016 +0200

    tools: fix device leaks in gst-device-monitor
    
    gst_message_parse_device_{added,removed} is actually returning a new ref
    on the device.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768776
Comment 6 Tim-Philipp Müller 2016-07-15 15:44:26 UTC
commit b83bd85ed51b779e88a4f3c79eb6bcd10ae4c437
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Wed Jul 13 16:02:25 2016 +0200

    playbin3: fix leaks of collection returned by message parse API
    
    gst_message_parse_stream_collection() and
    gst_message_parse_streams_selected() actually return a reffed
    GstStreamCollection.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768776