caps: Using gst_caps_fixate with PyGobject lead to refcount issues
Submitted by Thibault Saunier
And crash since:
commit cce18426f756c0a17410020b0e5db06e7546257c Author: Tim-Philipp Müller firstname.lastname@example.org Date: Mon Jul 3 09:03:24 2017 +0100
miniobject: make refcount tracing and debug logging reliable Tracing of the refcounts wasn't thread-safe, and log output of the refcount values before/after wasn't reliable. https://bugzilla.gnome.org/show_bug.cgi?id=784383
It is annoted as input caps are (transfer full) and return caps are also (transfer full). Basically in the case where make_writable simply return, we gave our ref and got it back in the return value, otherwise the input caps is unreffed (in make_writable) and we get a copy of the caps as a return value, so to me the annotation look good but I am not 100% certain.
If you also think it is correct we should move that bug to PyGObject itself.
I also attach here a simple test to be applied to gst-python and showing the issue.