From 8cf3a3a4f43eb2a262e8a4d623aaf6bc4d7401b3 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Thu, 29 May 2014 16:11:20 +1000 Subject: [PATCH] gl/colorconvert: optimise the same format case simply return the input buffer unchanged --- gst-libs/gst/gl/gstglcolorconvert.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst-libs/gst/gl/gstglcolorconvert.c b/gst-libs/gst/gl/gstglcolorconvert.c index fcc6aebde4..c2ea17a5c5 100644 --- a/gst-libs/gst/gl/gstglcolorconvert.c +++ b/gst-libs/gst/gl/gstglcolorconvert.c @@ -559,6 +559,9 @@ _gst_gl_color_convert_perform_unlocked (GstGLColorConvert * convert, g_return_val_if_fail (convert != NULL, FALSE); g_return_val_if_fail (inbuf, FALSE); + if (gst_video_info_is_equal (&convert->in_info, &convert->out_info)) + return gst_buffer_ref (inbuf); + convert->inbuf = inbuf; gst_gl_context_thread_add (convert->context,