Skip to content
Commit eedf74fc authored by Harald Sitter's avatar Harald Sitter 🐧
Browse files

don't construct objects when gst init failed

what happend is that we continued constructing backend objects even when
gst init failed (supposedly that is only the case since the pipeline
refactor) which in turn lead to crashing as it would have required just
about every function to do validity checking before doing anything at all.
the good news is that libphonon already does that as part of its own
validity system. whenver the backend returns 0 on an object construction
request libphonon's corresponding frontend object will simply ignore all
calls thus allowing a scenario in which the backend cannot construct
any valid backend objects (such as when gst init fails).

consequently also remove pointless checks for the validity in the
AO, MO and devicemanager ctors. also the managers are now only constructed
if gst_init was successful.

ultimate result of this is that when gst_init failed or our plugin
requirements are not met (i.e. gst-base is not present) no object will
get constructed other than the Backend object itself.

BUG: 310394

Conflicts:
	gstreamer/devicemanager.cpp
	gstreamer/mediaobject.cpp
parent edfb92e9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment