I’m trying to encode multiple D3D12 textures into a video file, but the video is flashing black.
pCommandQueue->Signal(pFence.Get(), 1);
pFence->SetEventOnCompletion(1, pEventHandle);
WaitForSingleObject(pEventHandle, INFINITE);
BYTE* pData;
hr = readbackBuffer->Map(0, nullptr, reinterpret_cast<void**>(&pData));
if (FAILED(hr)) {
std::cerr << "[FFMPEG-D3D12-GRABBER] - Failed to map readback buffern";
return;
}
I did the same thing with D3D11 and it worked fine