From 6a18a1346b65065c0c7236403292c629e8dcd05b Mon Sep 17 00:00:00 2001 From: Julien Isorce Date: Mon, 28 Apr 2014 15:07:34 +0100 Subject: [PATCH] glfilter: only warn when other_context attribute is set Fix false positive --- gst-libs/gst/gl/gstglfilter.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gst-libs/gst/gl/gstglfilter.c b/gst-libs/gst/gl/gstglfilter.c index 5d6fc6d61d..3f900712f0 100644 --- a/gst-libs/gst/gl/gstglfilter.c +++ b/gst-libs/gst/gl/gstglfilter.c @@ -942,12 +942,15 @@ gst_gl_filter_decide_allocation (GstBaseTransform * trans, GstQuery * query) } } - if (!other_context) - other_context = filter->other_context; - else - GST_ELEMENT_WARNING (filter, LIBRARY, SETTINGS, - ("%s", "Cannot share with more than one GL context"), - ("%s", "Cannot share with more than one GL context")); + if (filter->other_context) { + if (!other_context) { + other_context = filter->other_context; + } else { + GST_ELEMENT_WARNING (filter, LIBRARY, SETTINGS, + ("%s", "Cannot share with more than one GL context"), + ("%s", "Cannot share with more than one GL context")); + } + } if (!filter->context) { filter->context = gst_gl_context_new (filter->display);