Skip to content

Conversation

@asticode
Copy link
Contributor

@asticode asticode commented Nov 12, 2024

Hey @Sean-Der,

A user of https://github.com/asticode/go-astiav has reported a memory leak and glitches in this example therefore I took the liberty to submit a PR fixing those problems. Here's what I've added:

  • memory leak: unreferencing decodePacket before each inputFormatContext.ReadFrame() fixes the issue although it's weird to have to do that. My guess is that lavfi has a very specific behavior having a complex filter under the hood
  • glitches: I've added proper encoder parameters to disable B frames since they don't seem to be handled by webrtc
  • frame duration computation: I've also updated the frame duration computation since its value was incorrect and since we can compute it automatically based on the videoFrame's average framerate

Cheers

@asticode asticode requested a review from Sean-Der November 12, 2024 16:32
@codecov
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 0.00%. Comparing base (f07d02b) to head (49e921a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff            @@
##           master    #272     +/-   ##
========================================
  Coverage    0.00%   0.00%             
========================================
  Files          25       8     -17     
  Lines        2825     378   -2447     
========================================
+ Misses       2825     378   -2447     
Flag Coverage Δ
go ?
wasm 0.00% <ø> (ø)

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.

@Sean-Der
Copy link
Member

Amazing! Thank you so much @asticode, sorry about bad examples causing issues for your users :(

@asticode
Copy link
Contributor Author

sorry about bad examples causing issues for your users :(

No worries, examples in my repo have the same problems so I'm the root cause of all this 😱

@Sean-Der Sean-Der merged commit 851c8b0 into pion:master Nov 13, 2024
12 of 14 checks passed
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.

2 participants