glimagesink: update display size before sending event
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Fri, 21 Aug 2015 20:42:18 +0000 (13:42 -0700)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:32:08 +0000 (19:32 +0000)
This is minor issue, as the reconfigure event is asynchronous.
Basically, update width/height before sending the event.

ext/gl/gstglimagesink.c

index febad5de222ed6e1d6df92006935db44d33edc78..8e299806de949c11c8f9157b8fd3610246373aa3 100644 (file)
@@ -1775,15 +1775,15 @@ gst_glimage_sink_do_resize (GstGLImageSink * gl_sink, gint width, gint height)
       && (gl_sink->window_width != 0)
       && (gl_sink->window_height != 0);
 
+  gl_sink->window_width = width;
+  gl_sink->window_height = height;
+
   if (reconfigure) {
     GST_DEBUG ("Sending reconfigure event on sinkpad.");
     gst_pad_push_event (GST_BASE_SINK (gl_sink)->sinkpad,
         gst_event_new_reconfigure ());
   }
 
-  gl_sink->window_width = width;
-  gl_sink->window_height = height;
-
   /* default reshape */
   if (!do_reshape) {
     if (gl_sink->keep_aspect_ratio) {