Skip to content

Conversation

@kasper93
Copy link
Member

No description provided.

We may not receive next draw call after reset and it is still important
to flush existing frames.
When filters return hw frames, we may not hold reference to the parent
context, for most API it's not a problem, because they are all
refcounted, but AMF in ffmpeg forcefully dlclose() on uninit(), so we
need to make sure any hw frames are flushed before this happens.

Fixes: mpv-player#17206
@sfan5
Copy link
Member

sfan5 commented Dec 30, 2025

When filters return hw frames, we may not hold reference to the parent
context, for most API it's not a problem, because they are all
refcounted, but AMF in ffmpeg forcefully dlclose() on uninit(), so we
need to make sure any hw frames are flushed before this happens.

I investigated this in the context of FFmpeg/FFmpeg@954784b and PR #14631 and was told by ffmpeg developers that holding a reference to frames is a valid thing to do and should always work.
This would mean it's a bug in the ffmpeg AMF code and not mpv's fault.

@github-actions
Copy link

@kasper93 kasper93 closed this Dec 30, 2025
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.

2 participants