mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 18:05: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)
|
gst_query_parse_context (GstQuery * query, GstContext ** context)
|
||||||
{
|
{
|
||||||
GstStructure *structure;
|
GstStructure *structure;
|
||||||
|
const GValue *v;
|
||||||
|
|
||||||
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_CONTEXT);
|
g_return_if_fail (GST_QUERY_TYPE (query) == GST_QUERY_CONTEXT);
|
||||||
g_return_if_fail (context != NULL);
|
g_return_if_fail (context != NULL);
|
||||||
|
|
||||||
structure = GST_QUERY_STRUCTURE (query);
|
structure = GST_QUERY_STRUCTURE (query);
|
||||||
*context = g_value_get_boxed (gst_structure_id_get_value (structure,
|
v = gst_structure_id_get_value (structure, GST_QUARK (CONTEXT));
|
||||||
GST_QUARK (CONTEXT)));
|
if (v)
|
||||||
|
*context = g_value_get_boxed (v);
|
||||||
|
else
|
||||||
|
*context = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in a new issue