mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
query: Don't assert if no context is set in the query
This commit is contained in:
parent
2fbd6dcf24
commit
3821cee574
1 changed files with 6 additions and 2 deletions
|
@ -2495,13 +2495,17 @@ void
|
|||
gst_query_parse_context (GstQuery * query, GstContext ** context)
|
||||
{
|
||||
GstStructure *structure;
|
||||
const GValue *v;
|
||||
|
||||
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_CONTEXT);
|
||||
g_return_if_fail (context != NULL);
|
||||
|
||||
structure = GST_QUERY_STRUCTURE (query);
|
||||
*context = g_value_get_boxed (gst_structure_id_get_value (structure,
|
||||
GST_QUARK (CONTEXT)));
|
||||
v = gst_structure_id_get_value (structure, GST_QUARK (CONTEXT));
|
||||
if (v)
|
||||
*context = g_value_get_boxed (v);
|
||||
else
|
||||
*context = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue