fix: iOS OOM during PiP playback cycles

Cancel leaked stream subscriptions in video player dispose and flush
sample buffer layer on PiP teardown/cleanup to release video frames.
This commit is contained in:
edde746
2026-03-04 17:34:30 +01:00
parent e6ee83d9c2
commit 3b351d7634
3 changed files with 17 additions and 3 deletions
@@ -171,6 +171,7 @@ class MpvPlayerPlugin: NSObject, FlutterPlugin, FlutterStreamHandler, MpvPlayerD
playerCore?.isPipActive = false
isManualPipRequest = false
stopPipTimebaseSync()
pipController?.flushLayer()
_ = playerCore?.switchToGpuNextVO()
if pause { playerCore?.setProperty("pause", value: "yes") }
if notify { pipChannel?.invokeMethod("onPipChanged", arguments: false) }