Update thumbnail with high scoring image.

This commit is contained in:
Isaac Connor 2018-05-22 11:31:03 -04:00
parent be424f46f0
commit dc5ccd04ef
1 changed files with 1 additions and 1 deletions

View File

@ -520,7 +520,7 @@ void Event::AddFrame(Image *image, struct timeval timestamp, int score, Image *a
} }
} else { } else {
//If this is the first frame, we should add a thumbnail to the event directory //If this is the first frame, we should add a thumbnail to the event directory
if ( frames == 1 ) { if ( frames == 1 || score > (int)max_score ) {
char snapshot_file[PATH_MAX]; char snapshot_file[PATH_MAX];
snprintf(snapshot_file, sizeof(snapshot_file), "%s/snapshot.jpg", path); snprintf(snapshot_file, sizeof(snapshot_file), "%s/snapshot.jpg", path);
WriteFrameImage(image, timestamp, snapshot_file); WriteFrameImage(image, timestamp, snapshot_file);