Ref counting issues with MiniObject copy
neilcsmith-net opened this issue · 1 comments
neilcsmith-net commented
As currently mapped the use of @CallerOwnsReturn
on methods returning a GstMiniObject rather than a GObject may be incorrectly decrementing the refcount. MiniObject::copy is potentially one such concern. Noticed after calling Buffer::copy that the refcount is 0!
neilcsmith-net commented
Seems to be caused where we cache an initially unowned reference where something might be pooled (eg. Buffers). Then when a caller-owns-return reference is requested later we decrement the refcount when we shouldn't. We should keep the extra ref and mark as owned.