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
@ -136,6 +136,13 @@ compile_shader (GstD3D11Device * device, const gchar * shader_source,
|
|||||||
return NULL;
|
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;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user