Releases the Mutex when stopping the feed.

This commit is contained in:
Vitor Pamplona
2023-07-21 20:49:57 -04:00
parent a6f56416e3
commit 7e03870c0b

View File

@@ -531,6 +531,7 @@ private fun RenderVideoPlayer(
// if the user unmutes a video and it's not the current playing, switches to that one.
if (!mute && keepPlayingMutex != null && keepPlayingMutex != controller) {
keepPlayingMutex?.stop()
keepPlayingMutex?.release()
keepPlayingMutex = null
}
@@ -542,6 +543,7 @@ private fun RenderVideoPlayer(
if (newKeepPlaying) {
if (keepPlayingMutex != null && keepPlayingMutex != controller) {
keepPlayingMutex?.stop()
keepPlayingMutex?.release()
}
keepPlayingMutex = controller
} else {