rpicamsrc: Don't destroy the camera component on startup error

Just disable the camera component when it fails to start. The
most common reason is that the camera device is already in use,
and if we just disable the mmal component correct cleanup
will happen later
This commit is contained in:
Jan Schmidt 2018-06-20 15:36:42 +00:00 committed by Tim-Philipp Müller
parent 39a026760d
commit 09d9ac2d2e

View file

@ -1268,9 +1268,8 @@ raspi_capture_set_format_and_start(RASPIVID_STATE *state)
return status;
error:
if (camera)
mmal_component_destroy(camera);
mmal_component_disable(camera);
return status;
}