From 23f5a075ab19a7e65a478269e3ee9a0db52c368e Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Fri, 20 Jun 2008 17:02:48 +0000 Subject: [PATCH] sys/xvimage/xvimagesink.c: Don't set colour balance values on the Xv port if the user hasn't changed them (via proper... Original commit message from CVS: * sys/xvimage/xvimagesink.c: Don't set colour balance values on the Xv port if the user hasn't changed them (via properties or the interface). Avoids accumulating rounding errors for the common case. Partial fix for bug #537889. --- ChangeLog | 8 ++++++++ sys/xvimage/xvimagesink.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 84b46363f4..b08110f31e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-06-20 Michael Smith + + * sys/xvimage/xvimagesink.c: + Don't set colour balance values on the Xv port if the user hasn't + changed them (via properties or the interface). Avoids accumulating + rounding errors for the common case. + Partial fix for bug #537889. + 2008-06-20 Michael Smith * gst/playback/gstdecodebin2.c: diff --git a/sys/xvimage/xvimagesink.c b/sys/xvimage/xvimagesink.c index b96a2a9013..135c1ff2e7 100644 --- a/sys/xvimage/xvimagesink.c +++ b/sys/xvimage/xvimagesink.c @@ -1027,6 +1027,11 @@ gst_xvimagesink_update_colorbalance (GstXvImageSink * xvimagesink) if (xvimagesink->xcontext == NULL) return; + /* Don't set the attributes if they haven't been changed, to avoid + * rounding errors changing the values */ + if (!xvimagesink->cb_changed) + return; + /* For each channel of the colorbalance we calculate the correct value doing range conversion and then set the Xv port attribute to match our values. */