Skip to content

Comments

Fix RTP NACK responder buffers not released after RemoveTrack/Stop#405

Open
ivanlukomskiy wants to merge 1 commit intopion:masterfrom
ivanlukomskiy:fix-responder-interceptor-resources-cleanup
Open

Fix RTP NACK responder buffers not released after RemoveTrack/Stop#405
ivanlukomskiy wants to merge 1 commit intopion:masterfrom
ivanlukomskiy:fix-responder-interceptor-resources-cleanup

Conversation

@ivanlukomskiy
Copy link

@ivanlukomskiy ivanlukomskiy commented Feb 14, 2026

Description

Currently, RTP packet history allocated by ResponderInterceptor remains retained after a sender is removed (RemoveTrack) while the PeerConnection stays active. This causes gradual memory growth in applications that dynamically add and remove outbound streams.

This change ensures that per-stream RTP history is properly cleaned up during UnbindLocalStream, preventing unnecessary memory retention while keeping the PeerConnection alive.

Reference issue

Fixes #404 https://github.com/pion/interceptor/issues/404

@codecov
Copy link

codecov bot commented Feb 14, 2026

Codecov Report

❌ Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.71%. Comparing base (40d68d9) to head (7f62d2b).
⚠️ Report is 21 commits behind head on master.

Files with missing lines Patch % Lines
internal/rtpbuffer/rtpbuffer.go 0.00% 5 Missing ⚠️
pkg/nack/responder_interceptor.go 0.00% 1 Missing ⚠️

❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (70.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #405      +/-   ##
==========================================
+ Coverage   79.69%   79.71%   +0.02%     
==========================================
  Files          82       88       +6     
  Lines        4063     4590     +527     
==========================================
+ Hits         3238     3659     +421     
- Misses        659      748      +89     
- Partials      166      183      +17     
Flag Coverage Δ
go 79.71% <0.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant