Raspistill: Only fail setting restart int if not 0
authorDave Stevenson <6by9@users.noreply.github.com>
Thu, 10 Nov 2016 22:36:52 +0000 (22:36 +0000)
committerpopcornmix <popcornmix@gmail.com>
Fri, 11 Nov 2016 17:47:16 +0000 (17:47 +0000)
Older firmwares don't support setting the JPEG
restart interval, but RaspiStill will abort if
it fails.
Only abort if the restart interval is non-zero
(ie other than the default) and it fails.

host_applications/linux/apps/raspicam/RaspiStill.c

index b4c483dc399c84f3114144354abed7f5bc756476..c7d3f7904dbb7d1d9865793a100db82ba75145ad 100644 (file)
@@ -1277,7 +1277,7 @@ static MMAL_STATUS_T create_encoder_component(RASPISTILL_STATE *state)
    // Set the JPEG restart interval
    status = mmal_port_parameter_set_uint32(encoder_output, MMAL_PARAMETER_JPEG_RESTART_INTERVAL, state->restart_interval);
 
-   if (status != MMAL_SUCCESS)
+   if (state->restart_interval && status != MMAL_SUCCESS)
    {
       vcos_log_error("Unable to set JPEG restart interval");
       goto error;