GstEnginePipeline: Simplify checking for NULL state
This commit is contained in:
@@ -1789,11 +1789,7 @@ bool GstEnginePipeline::IsStateNull() const {
|
|||||||
if (!pipeline_) return true;
|
if (!pipeline_) return true;
|
||||||
|
|
||||||
GstState s = GST_STATE_NULL, sp = GST_STATE_NULL;
|
GstState s = GST_STATE_NULL, sp = GST_STATE_NULL;
|
||||||
if (gst_element_get_state(pipeline_, &s, &sp, kGstStateTimeoutNanosecs) == GST_STATE_CHANGE_FAILURE) {
|
return gst_element_get_state(pipeline_, &s, &sp, kGstStateTimeoutNanosecs) == GST_STATE_CHANGE_SUCCESS && s == GST_STATE_NULL;
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return s == GST_STATE_NULL;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user