Skip to content

Fix image capture indices always starting from 1#2656

Merged
johnnovak merged 1 commit intomainfrom
jn/fix-capture-index-generation
Jul 1, 2023
Merged

Fix image capture indices always starting from 1#2656
johnnovak merged 1 commit intomainfrom
jn/fix-capture-index-generation

Conversation

@johnnovak
Copy link
Copy Markdown
Member

@johnnovak johnnovak commented Jul 1, 2023

A last-minute improvement to the capture PR to create the capture directory on-demand (lazily) introduced a regression: the image capture indices now always start from 1, potentially overwriting existing images. This was a result of the image capturers running asynchronously in separate threads combined with the lazy/deferred capture directory creation and highest index lookup approach.

This is the fix for that, plus also for a potential race condition when determining the current highest capture indices.

@johnnovak johnnovak self-assigned this Jul 1, 2023
@johnnovak johnnovak added the regression We broke something 😊 label Jul 1, 2023
@johnnovak johnnovak force-pushed the jn/fix-capture-index-generation branch from cd2e0d2 to 429f7b5 Compare July 1, 2023 07:18
Copy link
Copy Markdown
Collaborator

@FeralChild64 FeralChild64 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK.

BTW - funny thing, I just wanted to report this bug, and the fix is already available :)

@johnnovak
Copy link
Copy Markdown
Member Author

Thanks for the review @FeralChild64

@johnnovak johnnovak merged commit 723a541 into main Jul 1, 2023
@johnnovak johnnovak deleted the jn/fix-capture-index-generation branch July 8, 2023 00:27
@johnnovak johnnovak added the video Graphics and video related issues label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

regression We broke something 😊 video Graphics and video related issues

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants