mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
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:
parent
29be6ff83a
commit
4151e8e052
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue