d3d12videosink: Clear cached buffer on format change

Otherwise converter will try to read memory of which layout/format
might be different from configured converter pipeline

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7167>
This commit is contained in:
Seungha Yang 2024-07-13 00:04:10 +09:00 committed by GStreamer Marge Bot
parent 058ae85b22
commit 2a6967a8cd

View file

@ -347,6 +347,8 @@ SwapChain::setup_swapchain (GstD3D12Window * window, GstD3D12Device * device,
} }
} }
gst_clear_buffer (&resource_->cached_buf);
render_format_ = format; render_format_ = format;
crop_rect_ = CD3DX12_BOX (0, 0, in_info->width, in_info->height); crop_rect_ = CD3DX12_BOX (0, 0, in_info->width, in_info->height);
prev_crop_rect_ = crop_rect_; prev_crop_rect_ = crop_rect_;