mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gltestsrc: Unref context when creation failed and guard against that in fill()
This commit is contained in:
parent
fc607b3c53
commit
7f7ceea8de
1 changed files with 3 additions and 1 deletions
|
@ -440,7 +440,7 @@ gst_gl_test_src_fill (GstPushSrc * psrc, GstBuffer * buffer)
|
||||||
|
|
||||||
src = GST_GL_TEST_SRC (psrc);
|
src = GST_GL_TEST_SRC (psrc);
|
||||||
|
|
||||||
if (G_UNLIKELY (!src->negotiated))
|
if (G_UNLIKELY (!src->negotiated || !src->context))
|
||||||
goto not_negotiated;
|
goto not_negotiated;
|
||||||
|
|
||||||
width = GST_VIDEO_INFO_WIDTH (&src->out_info);
|
width = GST_VIDEO_INFO_WIDTH (&src->out_info);
|
||||||
|
@ -692,6 +692,8 @@ context_error:
|
||||||
{
|
{
|
||||||
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
|
GST_ELEMENT_ERROR (src, RESOURCE, NOT_FOUND, ("%s", error->message),
|
||||||
(NULL));
|
(NULL));
|
||||||
|
gst_object_unref (src->context);
|
||||||
|
src->context = NULL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue