diff --git a/sys/d3d11/gstd3d11window.c b/sys/d3d11/gstd3d11window.c index d62047423a..52283cd55c 100644 --- a/sys/d3d11/gstd3d11window.c +++ b/sys/d3d11/gstd3d11window.c @@ -211,10 +211,10 @@ gst_d3d11_window_set_property (GObject * object, guint prop_id, gboolean force_aspect_ratio; force_aspect_ratio = g_value_get_boolean (value); - if (force_aspect_ratio != self->force_aspect_ratio) - self->pending_resize = TRUE; - - self->force_aspect_ratio = force_aspect_ratio; + if (force_aspect_ratio != self->force_aspect_ratio) { + self->force_aspect_ratio = force_aspect_ratio; + PostMessage (self->internal_win_id, WM_SIZE, 0, 0); + } break; } case PROP_ENABLE_NAVIGATION_EVENTS: @@ -588,8 +588,6 @@ gst_d3d11_window_on_resize (GstD3D11Window * window, gboolean redraw) window->rtv = NULL; } - window->pending_resize = FALSE; - /* Set zero width and height here. dxgi will decide client area by itself */ IDXGISwapChain_GetDesc (window->swap_chain, &swap_desc); hr = IDXGISwapChain_ResizeBuffers (window->swap_chain, @@ -1534,12 +1532,6 @@ gst_d3d11_window_render (GstD3D11Window * window, GstBuffer * buffer, } g_mutex_unlock (&window->lock); - GST_OBJECT_LOCK (window); - if (window->pending_resize) { - gst_d3d11_window_on_resize (window, FALSE); - } - GST_OBJECT_UNLOCK (window); - gst_d3d11_device_lock (window->device); ret = gst_d3d111_window_present (window, buffer); gst_d3d11_device_unlock (window->device); diff --git a/sys/d3d11/gstd3d11window.h b/sys/d3d11/gstd3d11window.h index 732ed99a7c..b70aceb9e6 100644 --- a/sys/d3d11/gstd3d11window.h +++ b/sys/d3d11/gstd3d11window.h @@ -111,8 +111,6 @@ struct _GstD3D11Window GstD3D11Device *device; - gboolean pending_resize; - /* properties */ gboolean force_aspect_ratio; gboolean enable_navigation_events;