-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix a reference leak of hw_frames_ctx and prepare for QSV #736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a reference leak of hw_frames_ctx and prepare for QSV #736
Conversation
Your PR was set to |
8563311
to
30a40d6
Compare
30a40d6
to
b70ceaa
Compare
b70ceaa
to
1bf6fd2
Compare
After updating my sunshine, had a crash at startup, which I git bisected to this issue.
The crash happens on a fedora 36 machine with an AMD Radeon RX6900XT, using VA-API and only when using KMS grabbing (ie. with setcap done). Crash output:
Backtrace:
|
@KarlVogel can you file a bug for this so we don't lose track of it? |
Description
This is some plumbing work required for QuickSync. During the QuickSync work, I discovered a reference leak caused by
av_hwframe_get_buffer()
clobbering the reference that we already stored there inframe->hw_frames_ctx
. To avoid this, we need to pass thehw_frames_ctx
pointer intoset_frame()
rather than set it in the frame itself.Since QuickSync will need a fixed size frame pool, I changed
display_vram_t
to useav_hwframe_get_buffer()
rather than allocating a texture itself.No behavior changes expected (other than fixing the reference leak with CUDA and VAAPI on Linux).
Screenshot
Issues Fixed or Closed
Type of Change
.github/...
)Checklist
Branch Updates
LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.