diff options
author | Peter Varga <pvarga@inf.u-szeged.hu> | 2024-04-23 13:01:53 +0200 |
---|---|---|
committer | Peter Varga <pvarga@inf.u-szeged.hu> | 2024-04-25 08:38:21 +0200 |
commit | b46f923e69454fa79d22a5c1c731baf0999e393c (patch) | |
tree | 3450500594ce9237f39e83031be01d607da4b94b /src/core/stream_video_node.cpp | |
parent | b5cfe6054e593beb2123d8de36f65b3b14e214ff (diff) |
IOSurface is reference counted by the OS. Chromium wraps it by
gfx::ScopedIOSurface to handle reference counter implicitly.
Calling gfx::ScopedIOSurface::release() doesn't decrement the counter
just release the ownership, see //base/apple/scoped_typeref.h. Without
ownership, gfx::ScopedIOSurface cannot decrement the counter at the end
of the scope and IOSurface remains in the memory. As a fix, replace the
release() call with get() and let the scoper handle the lifetime of the
object.
Also release MTLTexture during clean-up because it can also hold
reference to the IOSurface.
Fixes: QTBUG-124353
Pick-to: 6.7
Change-Id: Idf590b1e48f0c988de8fc71556e99a43749d52e5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Anu Aliyas <anu.aliyas@qt.io>
Diffstat (limited to 'src/core/stream_video_node.cpp')
0 files changed, 0 insertions, 0 deletions