From 3976f3799b7993639ae213780b20448c01f58dd9 Mon Sep 17 00:00:00 2001 From: "hans@rhel5-devel.localdomain" Date: Wed, 27 May 2009 20:05:11 +0200 Subject: libv4l: Fix black screen on devices with hardware gamma control From: Hans de Goede libv4l: Fix black screen on devices with hardware gamma control Priority: normal Signed-off-by: Hans de Goede --- v4l2-apps/libv4l/libv4lconvert/processing/gamma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'v4l2-apps/libv4l/libv4lconvert/processing') diff --git a/v4l2-apps/libv4l/libv4lconvert/processing/gamma.c b/v4l2-apps/libv4l/libv4lconvert/processing/gamma.c index 7695abcb7..fcb5bb0cf 100644 --- a/v4l2-apps/libv4l/libv4lconvert/processing/gamma.c +++ b/v4l2-apps/libv4l/libv4lconvert/processing/gamma.c @@ -23,7 +23,9 @@ #define CLIP(color) (unsigned char)(((color)>0xff)?0xff:(((color)<0)?0:(color))) static int gamma_active(struct v4lprocessing_data *data) { - return v4lcontrol_get_ctrl(data->control, V4LCONTROL_GAMMA) != 1000; + int gamma = v4lcontrol_get_ctrl(data->control, V4LCONTROL_GAMMA); + + return gamma && gamma != 1000; } static int gamma_calculate_lookup_tables( -- cgit v1.2.3