From: Sebastian Dröge Date: Wed, 23 Apr 2014 08:27:23 +0000 (+0200) Subject: gltestsrc: Unref context when creation failed and guard against that in fill() X-Git-Tag: 1.19.3~511^2~1989^2~1568 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7f7ceea8de76961459103ccf8cf35734bf7969ed;p=platform%2Fupstream%2Fgstreamer.git gltestsrc: Unref context when creation failed and guard against that in fill() --- diff --git a/ext/gl/gstgltestsrc.c b/ext/gl/gstgltestsrc.c index fea9ddfc3a..4fb30647ef 100644 --- a/ext/gl/gstgltestsrc.c +++ b/ext/gl/gstgltestsrc.c @@ -440,7 +440,7 @@ gst_gl_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer) src = GST_GL_TEST_SRC (psrc); - if (G_UNLIKELY (!src->negotiated)) + if (G_UNLIKELY (!src->negotiated || !src->context)) goto not_negotiated; width = GST_VIDEO_INFO_WIDTH (&src->out_info); @@ -692,6 +692,8 @@ context_error: { GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message), (NULL)); + gst_object_unref (src->context); + src->context = NULL; return FALSE; } }