gstreamer/libs/gst/controller
Adrian Pardini 16b2a6a234 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-26 12:39:18 +01:00
..
.gitignore Update a bunch of gitignores to clean up my git status output 2009-01-23 16:08:40 +00:00
gstargbcontrolbinding.c docs: update the controller docs 2013-02-05 18:42:43 +00:00
gstargbcontrolbinding.h controller: rename control-bindings 2012-01-30 21:18:57 +01:00
gstdirectcontrolbinding.c controller: fixes int overflow with properties that span +-INT_MAX 2013-08-26 12:39:18 +01:00
gstdirectcontrolbinding.h controller: expand the api to offer functions for plain and GValue arrays 2012-04-25 20:19:23 +02:00
gstinterpolationcontrolsource.c controller: constructures for control sources return GstControlSource 2012-01-31 12:29:52 +01:00
gstinterpolationcontrolsource.h controller: constructures for control sources return GstControlSource 2012-01-31 12:29:52 +01:00
gstlfocontrolsource.c controller: assorted minor introspection fixes 2012-06-19 19:55:02 -07:00
gstlfocontrolsource.h controller: constructures for control sources return GstControlSource 2012-01-31 12:29:52 +01:00
gsttimedvaluecontrolsource.c controller: Fix element-type annotations 2013-04-26 08:19:32 +02:00
gsttimedvaluecontrolsource.h libs: adjust comment style 2012-09-10 12:16:06 +02:00
gsttriggercontrolsource.c controller: constructures for control sources return GstControlSource 2012-01-31 12:29:52 +01:00
gsttriggercontrolsource.h controller: constructures for control sources return GstControlSource 2012-01-31 12:29:52 +01:00
Makefile.am Remove GST_USE_UNSTABLE_API guard and defines 2012-09-17 13:35:26 +01:00