element: Return an empty GstContext if none was set yet

This commit is contained in:
Sebastian Dröge 2013-07-16 15:34:57 +02:00
parent 356ef049d3
commit e47270ee24

View file

@ -3082,5 +3082,5 @@ gst_element_get_context (GstElement * element)
context = gst_context_ref (element->context); context = gst_context_ref (element->context);
GST_OBJECT_UNLOCK (element); GST_OBJECT_UNLOCK (element);
return context; return context ? context : gst_context_new ();
} }