mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
60cd511fad
commit
80c4396830
1 changed files with 3 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue