Skip to content

fix: MediaPlayer decoder and source lifetimes - #566

Merged
devopvoid merged 2 commits into
mainfrom
fix/media-player-decoder-drain
Nov 7, 2026
Merged

devopvoid merged 2 commits into
mainfrom
fix/media-player-decoder-drain

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

MediaPlayer could discard packets rejected with EAGAIN, continue the normal EOF/loop path after a decoder drain failure, and accept disposed output sources. Retain unaccepted packets while receiving pending output, retry both packets and drain requests, and stop the EOF/loop path when sending or receiving during drain fails. Remove the duplicate observer thread-stop callback.

Acquire audio and video source references under the existing native handle leases before taking over the reader. Reject any disposed source while leaving the reader with its caller, and keep the acquired references until the native pacer owns its references. Release temporary references on success and on every failure path.

Add deterministic coverage for decoder retries, drain failures and recovery, a single observer start/stop pair, disposed sources, reader reuse after rejection, and disposal on another thread between source acquisition and pacer construction. Update the source ownership documentation.

@devopvoid devopvoid changed the title Fix MediaPlayer decoder and source lifetimes fix: MediaPlayer decoder and source lifetimes Nov 7, 2026
@devopvoid
devopvoid merged commit 30971cf into main Nov 7, 2026
26 checks passed
@devopvoid
devopvoid deleted the fix/media-player-decoder-drain branch November 7, 2026 18:36
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