mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
gltestsrc: Run context query only during decide_allocation
Running the context query in _start and during the NULL->READY state transition can fail because downstream elements might not be able to answer and thus the source element would not be able to reuse downstream GLContext and GLDisplay. This issue happened specifically when trying to use gltestsrc in playbin.
This commit is contained in:
parent
179409e9b3
commit
d5f2b5dcfa
1 changed files with 0 additions and 17 deletions
|
@ -510,11 +510,6 @@ gst_gl_test_src_start (GstBaseSrc * basesrc)
|
||||||
{
|
{
|
||||||
GstGLTestSrc *src = GST_GL_TEST_SRC (basesrc);
|
GstGLTestSrc *src = GST_GL_TEST_SRC (basesrc);
|
||||||
|
|
||||||
if (!gst_gl_ensure_element_data (src, &src->display, &src->other_context))
|
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
gst_gl_display_filter_gl_api (src->display, SUPPORTED_GL_APIS);
|
|
||||||
|
|
||||||
src->running_time = 0;
|
src->running_time = 0;
|
||||||
src->n_frames = 0;
|
src->n_frames = 0;
|
||||||
src->negotiated = FALSE;
|
src->negotiated = FALSE;
|
||||||
|
@ -735,18 +730,6 @@ gst_gl_test_src_change_state (GstElement * element, GstStateChange transition)
|
||||||
gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
|
gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
|
||||||
gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
|
gst_element_state_get_name (GST_STATE_TRANSITION_NEXT (transition)));
|
||||||
|
|
||||||
switch (transition) {
|
|
||||||
case GST_STATE_CHANGE_NULL_TO_READY:
|
|
||||||
if (!gst_gl_ensure_element_data (element, &src->display,
|
|
||||||
&src->other_context))
|
|
||||||
return GST_STATE_CHANGE_FAILURE;
|
|
||||||
|
|
||||||
gst_gl_display_filter_gl_api (src->display, SUPPORTED_GL_APIS);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
|
||||||
if (ret == GST_STATE_CHANGE_FAILURE)
|
if (ret == GST_STATE_CHANGE_FAILURE)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue