Skip to content

fix: close a media player from a sink of a track it feeds - #435

Merged
devopvoid merged 1 commit into
mainfrom
fix/close-player-from-sink
Oct 24, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/close-player-from-sink

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

A sink of a track fed by a MediaPlayer runs on the player's pacing thread, so calling close() there joined that thread and aborted the JVM. The native release now detects the player's own threads and destroys the player on another thread once the call has returned.

MediaFileSource.close() no longer holds a lock while waiting for the player, which deadlocked against a close from a listener or sink.

A sink runs on the player's pacing thread, so close() from there joined that thread and aborted the JVM. The native release now detects the player's own threads and destroys the player on another one. MediaFileSource.close() no longer holds a lock while waiting for the player, which deadlocked against a close from a listener or sink.
@devopvoid
devopvoid force-pushed the fix/close-player-from-sink branch from a141320 to 185058d Compare October 24, 2026 12:42
@devopvoid
devopvoid merged commit b1de27c into main Oct 24, 2026
25 checks passed
@devopvoid
devopvoid deleted the fix/close-player-from-sink branch October 24, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant