diff options
author | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-05-27 20:05:11 +0200 |
---|---|---|
committer | hans@rhel5-devel.localdomain <hans@rhel5-devel.localdomain> | 2009-05-27 20:05:11 +0200 |
commit | 3976f3799b7993639ae213780b20448c01f58dd9 (patch) | |
tree | d4c9dfe0fd99d99d62e67ed20755186256296c6b /v4l2-apps/libv4l | |
parent | 3034758e42abc467926892a9c2d1c794e28cef1f (diff) | |
download | mediapointer-dvb-s2-3976f3799b7993639ae213780b20448c01f58dd9.tar.gz mediapointer-dvb-s2-3976f3799b7993639ae213780b20448c01f58dd9.tar.bz2 |
libv4l: Fix black screen on devices with hardware gamma control
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>
Diffstat (limited to 'v4l2-apps/libv4l')
-rw-r--r-- | v4l2-apps/libv4l/ChangeLog | 1 | ||||
-rw-r--r-- | v4l2-apps/libv4l/libv4lconvert/processing/gamma.c | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/v4l2-apps/libv4l/ChangeLog b/v4l2-apps/libv4l/ChangeLog index 83fa29a70..3f709a632 100644 --- a/v4l2-apps/libv4l/ChangeLog +++ b/v4l2-apps/libv4l/ChangeLog @@ -1,6 +1,7 @@ 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 ------------- 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( |