Decouple capture frame counter from the burst length

This commit is contained in:
Martijn Braam
2023-07-22 16:01:52 +02:00
parent 16dfb9ba19
commit c62ac5950f
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

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