From bea8e5c6ca77ba3289bcce106d417d443ec3762b Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Sun, 14 Jun 2020 16:48:45 +0100 Subject: [PATCH] Gst.py: unref __parent__ on unmap otherwise it cause a memory leak --- gi/overrides/Gst.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gi/overrides/Gst.py b/gi/overrides/Gst.py index c62d9e1..e7eeb29 100644 --- a/gi/overrides/Gst.py +++ b/gi/overrides/Gst.py @@ -631,6 +631,7 @@ class Buffer(Gst.Buffer): raise MapError('MappingError','Buffer mapping was not successfull') def unmap(self, mapinfo): + mapinfo.__parent__ = None if _gi_gst.buffer_override_unmap(self, mapinfo) is not True: raise MapError('UnmappingError','Buffer unmapping was not successfull') @@ -647,6 +648,7 @@ class Memory(Gst.Memory): raise MapError('MappingError','Memory mapping was not successfull') def unmap(self, mapinfo): + mapinfo.__parent__ = None return _gi_gst.memory_override_unmap(self, mapinfo) Memory = override(Memory) -- 2.7.4