<div dir="ltr"><div>
Hello!</div><div><br></div><div>I'm trying to make a hardware decoder/renderer analogue to
<a href="https://github.com/moonlight-stream/moonlight-qt/blob/master/app/streaming/video/ffmpeg-renderers/dxva2.cpp">Moonlight's DXVA2Renderer class</a>. As the one from the Moonlight-qt project, it
must provide a decoder service to ffmpeg and then retrieve the decoded
frame in order to present it to the screen. <br></div><div>I have implemented it and it
works with NVIDIA and Intel GPUs, but every time I try to use an AMD
GPU, it fails to decode a test frame (also fails to decode any
subsequent frame. The error message from ffmpeg says: "avcodec send
packet: Operation not permitted"). <br></div><div><br></div><div>I get no errors while initializing ffmpeg nor DXVA2; the first error occurs when trying to decode the test frame. I tested it on a laptop with an AMD Ryzen 9 5900HX CPU with Radeon Graphics (integrated GPU), and an NVIDIA GTX 3060 dedicated GPU. Also I've made tests on a Ryzen 3000 series with integrated graphics. The behaviour is exactly the same on both systems.</div><div><br></div><div>I know it's difficult to pinpoint a problem without looking at the code. I'd like to know if anyone has already seen this behaviour before, or maybe has a sense of what could be going on.<br></div><div><br></div><div>Any help is much appreciated!<br></div></div>