d3d11shader: Fix ID3DBlob object leak

Even if HLSL compiler was able to compile our shader code, D3DCompile()
might return ID3DBlob object for compile warnings and the object
should be released.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1914>
This commit is contained in:
Seungha Yang 2020-12-28 04:33:11 +09:00 committed by GStreamer Merge Bot
parent 29be6ff83a
commit 4151e8e052

View file

@ -136,6 +136,13 @@ compile_shader (GstD3D11Device * device, const gchar * shader_source,
return NULL;
}
if (error) {
const gchar *err = ID3D10Blob_GetBufferPointer (error);
GST_WARNING ("HLSL compiler warnings:\n%s", GST_STR_NULL (err));
ID3D10Blob_Release (error);
}
return ret;
}