glimagesink: clamp the resize width/height to >= 1 to avoid a GL error
authorMatthew Waters <matthew@centricular.com>
Thu, 6 Nov 2014 23:01:59 +0000 (10:01 +1100)
committerTim-Philipp Müller <tim@centricular.com>
Sat, 9 Dec 2017 19:31:49 +0000 (19:31 +0000)
ext/gl/gstglimagesink.c

index bc4945d..84daeb4 100644 (file)
@@ -1141,6 +1141,9 @@ gst_glimage_sink_on_resize (GstGLImageSink * gl_sink, gint width, gint height)
   g_signal_emit (gl_sink, gst_glimage_sink_signals[CLIENT_RESHAPE_SIGNAL], 0,
       gl_sink->context, width, height, &do_reshape);
 
+  width = MAX (1, width);
+  height = MAX (1, height);
+
   gl_sink->window_width = width;
   gl_sink->window_height = height;