From: Stefan Sauer Date: Tue, 27 Dec 2011 12:48:36 +0000 (+0100) Subject: triggercontrolsource: fix control reaches end of non-void function X-Git-Tag: RELEASE-0.11.2~270 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=855212cd2f890652791b18a43fcfe61779b8c2b6;p=platform%2Fupstream%2Fgstreamer.git triggercontrolsource: fix control reaches end of non-void function Return NAN and check the value further up. Fixes #666890 --- diff --git a/libs/gst/controller/gsttriggercontrolsource.c b/libs/gst/controller/gsttriggercontrolsource.c index c4f2562..5105a6d 100644 --- a/libs/gst/controller/gsttriggercontrolsource.c +++ b/libs/gst/controller/gsttriggercontrolsource.c @@ -79,9 +79,7 @@ _interpolate_trigger (GstTimedValueControlSource * self, GSequenceIter * iter, if (found) { return cp->value; } - - g_warning ("FIXME: _interpolate_trigger return value"); - return 0.0; /* FIXME */ + return FP_NAN; } static gboolean @@ -97,7 +95,8 @@ interpolate_trigger_get (GstTimedValueControlSource * self, gst_timed_value_control_source_find_control_point_iter (self, timestamp); if (iter) { *value = _interpolate_trigger (self, iter, timestamp); - ret = TRUE; + if (!isnan (*value)) + ret = TRUE; } g_mutex_unlock (self->lock); return ret; @@ -141,7 +140,8 @@ interpolate_trigger_get_value_array (GstTimedValueControlSource * self, if (iter1) { val = _interpolate_trigger (self, iter1, ts); - ret = TRUE; + if (!isnan (val)) + ret = TRUE; } else { g_mutex_unlock (self->lock); return FALSE; @@ -150,7 +150,8 @@ interpolate_trigger_get_value_array (GstTimedValueControlSource * self, } else if (triggered) { if (iter1) { val = _interpolate_trigger (self, iter1, ts); - ret = TRUE; + if (!isnan (val)) + ret = TRUE; } else { g_mutex_unlock (self->lock); return FALSE;