gtkwaylandsink: Force a redraw on resolution change

As we don't render into the widget directly, there is no "initial" draw
happening. As a side effect, the internal aspect ratio adapted display
width/height is never initialize leading to assertions when handling navigation
events.

  gst_video_center_rect: assertion 'src->h != 0' failed

Simply queue a redraw after setting the widget format in order to fix the issue.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3801>
This commit is contained in:
Nicolas Dufresne 2023-02-15 12:34:27 -05:00 committed by GStreamer Marge Bot
parent 3ed0d34065
commit 018fdf36b1

View file

@ -875,6 +875,12 @@ gst_gtk_wayland_sink_set_caps (GstBaseSink * bsink, GstCaps * caps)
GST_OBJECT_UNLOCK (self); GST_OBJECT_UNLOCK (self);
return FALSE; return FALSE;
} }
/* Ensure queue_draw get executed and internal display size get initialized.
* This does not happen otherwise as we don't draw in the widget
*/
gtk_gst_base_widget_queue_draw (GTK_GST_BASE_WIDGET (priv->gtk_widget));
GST_OBJECT_UNLOCK (self); GST_OBJECT_UNLOCK (self);
priv->use_dmabuf = use_dmabuf; priv->use_dmabuf = use_dmabuf;