gstreamer/libs/gst/controller
Adrian Pardini d4f6c8e0e6 controller: fixes int overflow with properties that span +-INT_MAX
When the range for a property is defined as -INT_MAX-1 .. INT_MAX, like
the xpos in a videomixer the following expression in the macro
definitions of convert_g_value_to_##type (and the equivalent in
convert_value_to_##type)

v = pspec->minimum + (g##type) ROUNDING_OP ((pspec->maximum - pspec->minimum) * s);

are converted to:

v = -2147483648 + (g##type) ROUNDING_OP ((2147483647 - -2147483648) * s);

(2147483647 - -2147483648) overflows to -1 and the net result is:

v = -2147483648 + (g##type) ROUNDING_OP (-1 * s);

so v only takes the values -2147483648 for s == 0 and 2147483647
for s == 1.

Rewriting the expression as minimum*(1-s) + maximum*s gives the correct
result in this case.

https://bugzilla.gnome.org//show_bug.cgi?id=705630
2013-08-08 12:31:49 +02:00
..
.gitignore Update a bunch of gitignores to clean up my git status output 2009-01-23 16:08:40 +00:00
controller.h libs: Use foo/foo.h as single-include header consistently everywhere 2012-12-12 16:44:14 +00:00
gstargbcontrolbinding.c argb-controlbinding: fix messed up property setter 2013-03-28 16:51:25 +01:00
gstargbcontrolbinding.h Fix FSF address 2012-11-03 20:44:48 +00:00
gstdirectcontrolbinding.c controller: fixes int overflow with properties that span +-INT_MAX 2013-08-08 12:31:49 +02:00
gstdirectcontrolbinding.h Fix FSF address 2012-11-03 20:44:48 +00:00
gstinterpolationcontrolsource.c Fix FSF address 2012-11-03 20:44:48 +00:00
gstinterpolationcontrolsource.h Fix FSF address 2012-11-03 20:44:48 +00:00
gstlfocontrolsource.c lfo: set a sensible lower boundary for the frequency 2013-03-07 09:18:25 +01:00
gstlfocontrolsource.h Fix FSF address 2012-11-03 20:44:48 +00:00
gsttimedvaluecontrolsource.c controller: Fix the function signature and a minor typo fix 2013-05-07 14:53:23 +02:00
gsttimedvaluecontrolsource.h Fix FSF address 2012-11-03 20:44:48 +00:00
gsttriggercontrolsource.c triggercontrolsource: add missing end_iter check for sequence 2013-02-17 19:53:55 +01:00
gsttriggercontrolsource.h Fix FSF address 2012-11-03 20:44:48 +00:00
Makefile.am Use GST_*_1_0 environment variables everywhere 2013-01-15 13:47:32 +00:00