fix: unblock preroll on mpegtssrt output (async=false)#504
Merged
Conversation
In listener mode without a connected client, srtsink holds PAUSED->PLAYING until the first buffer arrives, which blocks pipeline preroll. Matches the pattern used by WHEP/WHIP/AES67 sinks. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
async=falseon thesrtsinkin thebuiltin.mpegtssrt_outputblockasync=trueholds PAUSED→PLAYING until the first buffer arrives, which can block the whole pipeline from reaching PLAYINGWhy
A flow with an mpegtssrt output consistently failed to transition PAUSED→PLAYING, with downstream h264parse EOS errors appearing during state change. Root cause: the SRT sink was waiting for a buffer to complete preroll; before any client had connected, preroll never completed. With
async=false, the sink no longer gates preroll.Test plan
mpegtssrt_output(listener mode, no client) reachesPlayingKnown follow-up (not in this PR)
On stop+restart, libsrt's internal socket state keeps the listener port busy for a few minutes ("Another socket is already listening on the same port"). That is a separate issue — libsrt-internal, outside our code — and will be addressed separately.
🤖 Generated with Claude Code