Browse Source

Decouple capture frame counter from the burst length

Martijn Braam 1 year ago
parent
commit
c62ac5950f
2 changed files with 3 additions and 2 deletions
  1. 2 2
      src/process_pipeline.c
  2. 1 0
      src/state.h

+ 2 - 2
src/process_pipeline.c

@@ -822,10 +822,9 @@ process_image(MPPipeline *pipeline, const MPBuffer *buffer)
         GdkTexture *thumb = process_image_for_preview(image);
 
         if (state_proc.captures_remaining > 0) {
-                int count = state_proc.burst_length - state_proc.captures_remaining;
                 --state_proc.captures_remaining;
 
-                process_image_for_capture(image, count);
+                process_image_for_capture(image, state_proc.counter++);
 
                 if (state_proc.captures_remaining == 0) {
                         assert(thumb);
@@ -885,6 +884,7 @@ capture()
         strcpy(burst_dir, tempdir);
 
         state_proc.captures_remaining = state_proc.burst_length;
+        state_proc.counter = 0;
 }
 
 void

+ 1 - 0
src/state.h

@@ -76,6 +76,7 @@ typedef struct state_proc {
 
         int burst_length;
         int captures_remaining;
+        int counter;
         int preview_width;
         int preview_height;