mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 11:10:37 +00:00
plugins: fix usage of gst_vaapi_reply_to_query().
Make gst_vaapi_reply_to_query() first check whether the query argument is actually a video-context query, i.e. with type GST_QUERY_TYPE_CUSTOM. Then, make sure vaapisink propagates the query to the parent class if it is not a video-context query.
This commit is contained in:
parent
e6f0cbadd3
commit
578f788650
2 changed files with 11 additions and 3 deletions
|
@ -220,6 +220,9 @@ gst_vaapi_reply_to_query(GstQuery *query, GstVaapiDisplay *display)
|
|||
gint i;
|
||||
gboolean res = FALSE;
|
||||
|
||||
if (GST_QUERY_TYPE(query) != GST_QUERY_CUSTOM)
|
||||
return FALSE;
|
||||
|
||||
if (!display)
|
||||
return FALSE;
|
||||
|
||||
|
|
|
@ -961,9 +961,14 @@ gst_vaapisink_buffer_alloc(
|
|||
static gboolean
|
||||
gst_vaapisink_query(GstBaseSink *base_sink, GstQuery *query)
|
||||
{
|
||||
GstVaapiSink *sink = GST_VAAPISINK(base_sink);
|
||||
GST_DEBUG ("sharing display %p", sink->display);
|
||||
return gst_vaapi_reply_to_query (query, sink->display);
|
||||
GstVaapiSink * const sink = GST_VAAPISINK(base_sink);
|
||||
|
||||
if (gst_vaapi_reply_to_query(query, sink->display)) {
|
||||
GST_DEBUG("sharing display %p", sink->display);
|
||||
return TRUE;
|
||||
}
|
||||
return GST_BASE_SINK_CLASS(gst_vaapisink_parent_class)->query(base_sink,
|
||||
query);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue