d3d11videosink: Error out if RTV is unavailable

Add RTV pointer validation

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3573>
This commit is contained in:
Seungha Yang 2022-12-15 20:11:30 +09:00 committed by GStreamer Marge Bot
parent a0526b4ac2
commit 7a7de1aafc

View file

@ -889,6 +889,11 @@ gst_d3d111_window_present (GstD3D11Window * self, GstBuffer * buffer,
if (!buffer)
return GST_FLOW_OK;
if (!rtv) {
GST_ERROR_OBJECT (self, "RTV is unavailable");
return GST_FLOW_ERROR;
}
{
GstMapInfo infos[GST_VIDEO_MAX_PLANES];
ID3D11ShaderResourceView *srv[GST_VIDEO_MAX_PLANES];