mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
d3d12videosink: Fix crash on set_buffer()
set_buffer() can be called with null buffer Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5895>
This commit is contained in:
parent
7f2b4b6b09
commit
6ffed9b3dc
1 changed files with 1 additions and 1 deletions
|
@ -1370,7 +1370,7 @@ gst_d3d12_window_set_buffer (GstD3D12Window * window, GstBuffer * buffer)
|
|||
auto swapbuf = priv->ctx->swap_buffers[cur_idx];
|
||||
|
||||
auto crop_rect = priv->crop_rect;
|
||||
auto crop_meta = gst_buffer_get_video_crop_meta (buffer);
|
||||
auto crop_meta = gst_buffer_get_video_crop_meta (priv->ctx->cached_buf);
|
||||
if (crop_meta) {
|
||||
crop_rect = CD3DX12_BOX (crop_meta->x, crop_meta->y,
|
||||
crop_meta->x + crop_meta->width, crop_meta->y + crop_meta->height);
|
||||
|
|
Loading…
Reference in a new issue