Skip to content

fix: add buffer limits to appsrc elements#500

Merged
srperens merged 1 commit intomainfrom
fix/appsrc-buffer-limits
Apr 14, 2026
Merged

fix: add buffer limits to appsrc elements#500
srperens merged 1 commit intomainfrom
fix/appsrc-buffer-limits

Conversation

@srperens
Copy link
Copy Markdown
Collaborator

Summary

  • Adds max_bytes, max_time, and leaky_type to media player and WHIP appsrc elements to prevent unbounded memory growth when downstream is not consuming
  • Shared constants in blocks/mod.rs: video 20 MB, audio 2 MB, time 10 s
  • Observed 55 MB / 285 seconds accumulated in a single media player appsrc when downstream was unlinked

Test plan

  • Start a media player flow with no downstream link, verify appsrc levels stay within limits
  • Normal media player playback still works without drops
  • WHIP ingest sessions still work correctly

🤖 Generated with Claude Code

… growth

Without max_bytes/max_time, appsrc queues grow indefinitely when downstream
is not consuming (e.g. unlinked pipeline). Observed 55 MB / 285 seconds
accumulated in a media player appsrc. Adds shared constants for video
(20 MB), audio (2 MB), and time (10 s) limits across media player and
WHIP blocks.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@srperens srperens merged commit 1f51173 into main Apr 14, 2026
7 checks passed
@srperens srperens deleted the fix/appsrc-buffer-limits branch April 14, 2026 14:26
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