Skip to content

Fix boxed copies

Many gstreamer virtual functions will pass a boxed object as transfer-none for implementations to modify. Since 85175047 , a boxed copy was automatically made when marshalling arguments to python in the case of closures, and return values and out arguments in the case of regular invocations.

While this ensures memory access violations cannot happen, it also means closures had to operate on copies of the boxed structures, thus rendering many gstreamer base classes mostly unusable from python (see eg https://bugzilla.gnome.org/show_bug.cgi?id=727702)

This set of commits reverts the original change, then makes it so the copy only occurs at to_py_cleanup time, ie after the call is over. This means the test introduced in https://bugzilla.gnome.org/show_bug.cgi?id=722899 still passes, and the expected behaviour is preserved.

Merge request reports