From: Hans de Goede <hdegoede@redhat.com>
libv4l: Fix black screen on devices with hardware gamma control
Priority: normal
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
libv4l-0.6
----------
* Link libv4lconvert with -lm for powf by Gregor Jasny
+* Fix black screen on devices with hardware gamma control
libv4l-0.5.98
-------------
#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(