mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
vaapipostproc: Don't create filter on caps query
The problem with this is that creating the filter causes the display to be selected, and the caps query happens while linking the element. So, if the downstream or upstream element is using a specific display object, it won't be propagated correctly to the postproc as it already has a display at this point. https://bugzilla.gnome.org/show_bug.cgi?id=747945
This commit is contained in:
parent
0adb36b658
commit
6f298f6182
1 changed files with 5 additions and 6 deletions
|
@ -224,6 +224,9 @@ gst_vaapipostproc_ensure_filter (GstVaapiPostproc * postproc)
|
|||
if (!gst_vaapipostproc_ensure_display (postproc))
|
||||
return FALSE;
|
||||
|
||||
gst_caps_replace (&postproc->allowed_srcpad_caps, NULL);
|
||||
gst_caps_replace (&postproc->allowed_sinkpad_caps, NULL);
|
||||
|
||||
postproc->filter =
|
||||
gst_vaapi_filter_new (GST_VAAPI_PLUGIN_BASE_DISPLAY (postproc));
|
||||
if (!postproc->filter)
|
||||
|
@ -297,7 +300,7 @@ gst_vaapipostproc_start (GstBaseTransform * trans)
|
|||
ds_reset (&postproc->deinterlace_state);
|
||||
if (!gst_vaapi_plugin_base_open (GST_VAAPI_PLUGIN_BASE (postproc)))
|
||||
return FALSE;
|
||||
if (!gst_vaapipostproc_ensure_display (postproc))
|
||||
if (!gst_vaapipostproc_ensure_filter (postproc))
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -936,10 +939,8 @@ expand_allowed_srcpad_caps (GstVaapiPostproc * postproc, GstCaps * caps)
|
|||
{
|
||||
GValue value = G_VALUE_INIT, v_format = G_VALUE_INIT;
|
||||
guint i, num_structures;
|
||||
gboolean had_filter;
|
||||
|
||||
had_filter = postproc->filter != NULL;
|
||||
if (!had_filter && !gst_vaapipostproc_ensure_filter (postproc))
|
||||
if (postproc->filter == NULL)
|
||||
goto cleanup;
|
||||
if (!gst_vaapipostproc_ensure_filter_caps (postproc))
|
||||
goto cleanup;
|
||||
|
@ -967,8 +968,6 @@ expand_allowed_srcpad_caps (GstVaapiPostproc * postproc, GstCaps * caps)
|
|||
g_value_unset (&value);
|
||||
|
||||
cleanup:
|
||||
if (!had_filter)
|
||||
gst_vaapipostproc_destroy_filter (postproc);
|
||||
return caps;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue