d3d12: Fix leak in d3d12_video_proc when re-creating ID3D12VideoProcessor

Reviewed-by: Giancarlo Devich <gdevich@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18328>
This commit is contained in:
Sil Vilerino
2022-09-14 07:58:45 -04:00
parent c0e1548844
commit cd03643309

View File

@@ -107,6 +107,8 @@ d3d12_video_processor_end_frame(struct pipe_video_codec * codec,
InputFormats.push_back(GetDesc(curInput.InputStream[0].pTexture2D).Format);
}
// Release previous allocation
pD3D12Proc->m_spVideoProcessor.Reset();
if(!d3d12_video_processor_check_caps_and_create_processor(pD3D12Proc, InputFormats, InputColorSpace, OutputFormat, OutputColorSpace))
{
debug_printf("[d3d12_video_processor] d3d12_video_processor_end_frame - Failure when "