mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
Gst.py: unref __parent__ on unmap otherwise it cause a memory leak
This commit is contained in:
parent
9a31b01486
commit
bea8e5c6ca
1 changed files with 2 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue