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.
gint i;
gboolean res = FALSE;
+ if (GST_QUERY_TYPE(query) != GST_QUERY_CUSTOM)
+ return FALSE;
+
if (!display)
return FALSE;
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