Author: akv
Date: 2009-11-16 22:10:25 +0100 (Mon, 16 Nov 2009)
New Revision: 2747
Modified:
trunk/plugins/lensfun/lensfun.c
Log:
Not using lens correction if lens isn't added to RSLensDB.
Modified: trunk/plugins/lensfun/lensfun.c
===================================================================
--- trunk/plugins/lensfun/lensfun.c 2009-11-16 16:31:42 UTC (rev 2746)
+++ trunk/plugins/lensfun/lensfun.c 2009-11-16 21:10:25 UTC (rev 2747)
@@ -398,20 +398,19 @@
lensfun->selected_camera = cameras [0];
lf_free (cameras);
- const lfLens **lenses;
+ const lfLens **lenses = NULL;
- if (lensfun->lens)
+ if (rs_lens_get_lensfun_model(lensfun->lens))
{
model = rs_lens_get_lensfun_model(lensfun->lens);
- if (!model)
- model = rs_lens_get_description(lensfun->lens);
make = rs_lens_get_lensfun_make(lensfun->lens);
+
+ lenses = lf_db_find_lenses_hd(lensfun->ldb, cameras[0],
make, model, 0);
}
- lenses = lf_db_find_lenses_hd(lensfun->ldb, cameras[0], make,
model, 0);
if (!lenses)
{
- g_debug("lens not found (make: \"%s\" model: \"%s\")",
lensfun->lens_make, model);
+ g_debug("lens not found - disabling lens correction");
rs_filter_response_set_image(response, input);
g_object_unref(input);
return response;
_______________________________________________
Rawstudio-commit mailing list
[email protected]
http://rawstudio.org/cgi-bin/mailman/listinfo/rawstudio-commit