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)
committerMatthew Waters <matthew@centricular.com>
Thu, 6 Nov 2014 23:03:08 +0000 (10:03 +1100)
ext/gl/gstglimagesink.c

index bc4945dcc8916885dc52758e346760e568ebc755..84daeb4167cc46c5722dfb588883ed76dec0fa44 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;