Fix #1591 ffmpeg 8 error: init_hw_device for hwupload with VAAPI
#1594
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes #1591 and NixOS/nixpkgs#473008 by extension.
With the release of FFMPEG 8,
hwupload(a ffmpeg feature which is used by memories' VAAPI (AMD GPU) Hardware video decode) requires a device to be specified viainit_hw_device. This is documented by the ffmpeg project here: https://trac.ffmpeg.org/wiki/Hardware/VAAPI#DeviceSelectionRight now, FFMPEG 8 + Memories + VAAPI AMD GPU Hardware decode errors out with
[hwupload @ 0x558ab089cd40] A hardware device reference is required to upload frames to.With FFMPEG 7 this was not required (the documentation has the word
can, notmust) and was initialized automatically, but with the release of FFMPEG 8 this became required. I am not sure why and started an inquiry in the FFMPEG-DEVEL mailing list: https://lists.ffmpeg.org/archives/list/ffmpeg-devel@ffmpeg.org/thread/BZF2EO2WGL6U52WAKFPOKNT53OJF2AYG/Anyhow, this PR makes memories follow the documentation and initialize the VAAPI device explicitly.