vaapivideocontext: check if query context is NULL

Under certain conditions the element might receive a positive context query
but without a context instance. This situation will lead to a segmentation
fault when traversing the context list in the pipeline.

https://bugzilla.gnome.org/show_bug.cgi?id=767946
This commit is contained in:
Víctor Manuel Jáquez Leal 2016-06-24 12:05:24 +02:00
parent 60cd511fad
commit 80c4396830

View file

@ -141,6 +141,9 @@ _gst_context_get_from_query (GstElement * element, GstQuery * query,
return FALSE;
gst_query_parse_context (query, &ctxt);
if (!ctxt)
return FALSE;
GST_CAT_INFO_OBJECT (GST_CAT_CONTEXT, element,
"found context (%" GST_PTR_FORMAT ") in %s query", ctxt,
direction == GST_PAD_SRC ? "downstream" : "upstream");