Skip to content

Commit

Permalink
Fix error on cleanup when not capturing.
Browse files Browse the repository at this point in the history
mmal_port_disable(rawcam->output) was called unconditionally
when it is invalid if we have a connection set up between
rawcam and isp.
Add the required conditional.
  • Loading branch information
6by9 committed Apr 17, 2018
1 parent 75406d7 commit 094ad0e
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions raspiraw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1404,11 +1404,14 @@ int main(int argc, char** argv) {
stop_camera_streaming(sensor);

port_disable:
status = mmal_port_disable(output);
if (status != MMAL_SUCCESS)
if (cfg.capture)
{
vcos_log_error("Failed to disable port");
return -1;
status = mmal_port_disable(output);
if (status != MMAL_SUCCESS)
{
vcos_log_error("Failed to disable port");
return -1;
}
}
pool_destroy:
if (pool)
Expand Down

0 comments on commit 094ad0e

Please sign in to comment.