gstreamer/libs/gst
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
..
base typefindhelper: Avoid using buffer_get_size in tight loops 2013-07-30 06:59:44 +02:00
check docs: some small gtk-doc markup fixes 2013-07-30 23:33:28 +01:00
controller controller: fixes int overflow with properties that span +-INT_MAX 2013-08-08 12:31:49 +02:00
helpers Fix FSF address 2012-11-03 20:44:48 +00:00
net timeprovider: g-i: allow None as address for gst_net_time_provider_new() 2013-07-16 14:48:18 +01:00
Makefile.am dist net directory only once 2012-03-21 12:10:21 +01:00