mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
liveadder: remove unneeded variable
ret is declared just to initialize to TRUE and overwrite with the value of vret. We can return the value of vret directly. vret is TRUE unless the forward_event_func sets it to FALSE.
This commit is contained in:
parent
3b751bf775
commit
3bf12a1b9f
1 changed files with 1 additions and 6 deletions
|
@ -823,24 +823,19 @@ forward_event_func (const GValue * item, GValue * ret, gpointer user_data)
|
|||
static gboolean
|
||||
forward_event (GstLiveAdder * adder, GstEvent * event)
|
||||
{
|
||||
gboolean ret;
|
||||
GstIterator *it;
|
||||
GValue vret = { 0 };
|
||||
|
||||
GST_LOG_OBJECT (adder, "Forwarding event %p (%s)", event,
|
||||
GST_EVENT_TYPE_NAME (event));
|
||||
|
||||
ret = TRUE;
|
||||
|
||||
g_value_init (&vret, G_TYPE_BOOLEAN);
|
||||
g_value_set_boolean (&vret, TRUE);
|
||||
it = gst_element_iterate_sink_pads (GST_ELEMENT_CAST (adder));
|
||||
gst_iterator_fold (it, forward_event_func, &vret, event);
|
||||
gst_iterator_free (it);
|
||||
|
||||
ret = g_value_get_boolean (&vret);
|
||||
|
||||
return ret;
|
||||
return g_value_get_boolean (&vret);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue