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 759255 - gstreamer-1.0: Gst.MiniObject.make_writable should be marked with [ReturnsModifiedPointer]
gstreamer-1.0: Gst.MiniObject.make_writable should be marked with [ReturnsMod...
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Bindings
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-09 15:41 UTC by Pierre Lamot
Modified: 2017-03-08 09:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Pierre Lamot 2015-12-09 15:41:02 UTC
according to gst_mini_object_make_writable documentation:
   Checks if a mini-object is writable. If not, a writable copy is made and returned. This gives away the reference to the original mini object, and returns a reference to the new object.

if ReturnsModifiedPointer is not set, 
obj = obj.make_writable();
this lead to a reference count problem as the original object is unreferenced during the assignation.

this might also be the case for:
  - MiniObject.ref
  - Object.ref
  - DateTime.ref
  - Video.CodecFrame.ref
  - Video.CodecState.ref
  - Video.OverlayComposition.make_writable

I didn't enclosed a patch since it seems that this property can't be defined in a ".metadata" file
Comment 1 Rico Tzschichholz 2017-03-08 09:42:06 UTC
commit c4f2d4878463e5615dcc5186380b711755556053
Author: Rico Tzschichholz <ricotz@ubuntu.com>
Date:   Wed Mar 8 10:31:33 2017 +0100

    gstreamer-1.0: Mark *.make_writable with "ReturnsModifiedPointer"
    
commit 494727cca3e1d5f73f1be6b5b2bcfb12eb7aec04
Author: Rico Tzschichholz <ricotz@ubuntu.com>
Date:   Wed Mar 8 10:28:37 2017 +0100

    girparser: Add metadata-support for "returns_modified_pointer"