Przeglądaj źródła

Ensure the capture terminates

Martijn Braam 1 rok temu
rodzic
commit
2c3a16332d
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      src/io_pipeline.c

+ 1 - 0
src/io_pipeline.c

@@ -156,6 +156,7 @@ capture(MPPipeline *pipeline, const void *data)
         gain = mp_camera_control_get_int32(io_camera, V4L2_CID_GAIN);
         // gain_norm = (float)gain / (float)mpcamera.gain_max;
         // burst_length = (int)fmax(sqrt(gain_norm) * 10, 2) + 1;
+        burst_length = MIN(1, burst_length);
         captures_remaining = burst_length;
 
         // Change camera mode for capturing