diff --git a/process_pipeline.c b/process_pipeline.c index 4ba2f99..4fca4b3 100644 --- a/process_pipeline.c +++ b/process_pipeline.c @@ -424,6 +424,7 @@ mp_process_pipeline_process_image(MPImage image) // If we haven't processed the previous frame yet, drop this one if (frames_received != frames_processed && !is_capturing) { printf("Dropped frame at capture\n"); + free(image.data); return; } diff --git a/zbar_pipeline.c b/zbar_pipeline.c index 9fae808..e4c9257 100644 --- a/zbar_pipeline.c +++ b/zbar_pipeline.c @@ -160,6 +160,7 @@ mp_zbar_pipeline_process_image(cairo_surface_t *surface) { // If we haven't processed the previous frame yet, drop this one if (frames_received != frames_processed) { + cairo_surface_destroy(surface); return; }