mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-02 05:28:48 +00:00
glfilter: handle NULL decide_query which means passthrough
See https://bugzilla.gnome.org/show_bug.cgi?id=732178
This commit is contained in:
parent
045aa4ee7e
commit
f63c91ab71
1 changed files with 9 additions and 5 deletions
|
@ -873,18 +873,22 @@ gst_gl_filter_propose_allocation (GstBaseTransform * trans,
|
||||||
|
|
||||||
if (pool == NULL && need_pool) {
|
if (pool == NULL && need_pool) {
|
||||||
GstVideoInfo info;
|
GstVideoInfo info;
|
||||||
GstBufferPool *decide_pool;
|
GstBufferPool *decide_pool = NULL;
|
||||||
|
|
||||||
if (!gst_video_info_from_caps (&info, caps))
|
if (!gst_video_info_from_caps (&info, caps))
|
||||||
goto invalid_caps;
|
goto invalid_caps;
|
||||||
|
|
||||||
|
if (decide_query) {
|
||||||
gst_query_parse_allocation (decide_query, &decide_caps, NULL);
|
gst_query_parse_allocation (decide_query, &decide_caps, NULL);
|
||||||
decide_pool = gst_base_transform_get_buffer_pool (trans);
|
decide_pool = gst_base_transform_get_buffer_pool (trans);
|
||||||
if (GST_IS_GL_BUFFER_POOL (decide_pool)
|
}
|
||||||
|
|
||||||
|
if (decide_pool && GST_IS_GL_BUFFER_POOL (decide_pool)
|
||||||
&& gst_caps_is_equal_fixed (decide_caps, caps)) {
|
&& gst_caps_is_equal_fixed (decide_caps, caps)) {
|
||||||
pool = decide_pool;
|
pool = decide_pool;
|
||||||
} else {
|
} else {
|
||||||
GST_DEBUG_OBJECT (filter, "create new pool");
|
GST_DEBUG_OBJECT (filter, "create new pool");
|
||||||
|
if (decide_pool)
|
||||||
gst_object_unref (decide_pool);
|
gst_object_unref (decide_pool);
|
||||||
pool = gst_gl_buffer_pool_new (filter->context);
|
pool = gst_gl_buffer_pool_new (filter->context);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue