projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc607b3
)
gltestsrc: Unref context when creation failed and guard against that in fill()
author
Sebastian Dröge
<sebastian@centricular.com>
Wed, 23 Apr 2014 08:27:23 +0000
(10:27 +0200)
committer
Tim-Philipp Müller
<tim@centricular.com>
Sat, 9 Dec 2017 19:31:37 +0000
(19:31 +0000)
ext/gl/gstgltestsrc.c
patch
|
blob
|
history
diff --git
a/ext/gl/gstgltestsrc.c
b/ext/gl/gstgltestsrc.c
index fea9ddfc3af553bbe99e741072fb4bfca7166b82..4fb30647ef8459cfae2db202f6c926b2e6081ee2 100644
(file)
--- 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;
}
}