Skip to content

fix: unblock preroll on mpegtssrt output (async=false)#504

Merged
srperens merged 2 commits intomainfrom
fix/mpegtssrt-output-async-false
Apr 17, 2026
Merged

fix: unblock preroll on mpegtssrt output (async=false)#504
srperens merged 2 commits intomainfrom
fix/mpegtssrt-output-async-false

Conversation

@srperens
Copy link
Copy Markdown
Collaborator

Summary

  • Set async=false on the srtsink in the builtin.mpegtssrt_output block
  • In listener mode without a connected client, the default async=true holds PAUSED→PLAYING until the first buffer arrives, which can block the whole pipeline from reaching PLAYING
  • Matches the pattern already used by WHEP/WHIP/AES67 sinks in this repo

Why

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

  • Flow with mpegtssrt_output (listener mode, no client) reaches Playing
  • Verify encoded MPEG-TS is delivered correctly once a caller connects
  • Regression: WHEP/WHIP output flows still start cleanly

Known 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

Per Enstedt and others added 2 commits April 17, 2026 12:23
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>
@srperens srperens merged commit e69e014 into main Apr 17, 2026
7 checks passed
@srperens srperens deleted the fix/mpegtssrt-output-async-false branch April 17, 2026 10:46
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