Get zbar working again

This commit is contained in:
Benjamin Schaaf
2021-04-26 18:09:04 +10:00
parent f9e6576266
commit 44fc390b99
8 changed files with 329 additions and 254 deletions

View File

@@ -608,6 +608,9 @@ process_image(MPPipeline *pipeline, const MPBuffer *buffer)
memcpy(image, buffer->data, size);
mp_io_pipeline_release_buffer(buffer->index);
MPZBarImage *zbar_image = mp_zbar_image_new(image, mode.pixel_format, mode.width, mode.height, camera->rotate, camera->mirrored);
mp_zbar_pipeline_process_image(mp_zbar_image_ref(zbar_image));
cairo_surface_t *thumb = process_image_for_preview(image);
if (captures_remaining > 0) {
@@ -626,7 +629,7 @@ process_image(MPPipeline *pipeline, const MPBuffer *buffer)
assert(!thumb);
}
free(image);
mp_zbar_image_unref(zbar_image);
++frames_processed;
if (captures_remaining == 0) {