From 082293c5df0c99970e28330492cc4d30b0c629c8 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 22 Nov 2013 09:17:10 +0100 Subject: audio.c: Move variable declaration before code --- src/audio.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/audio.c b/src/audio.c index d7909c9..d77434b 100644 --- a/src/audio.c +++ b/src/audio.c @@ -146,6 +146,7 @@ cmumble_audio_create_playback_pipeline(struct cmumble *cm, GstElement *pipeline, *sink_bin; GError *error = NULL; char *desc = "appsrc name=src ! celtdec ! audioconvert ! autoaudiosink name=sink"; + GstIterator *it; pipeline = gst_parse_launch(desc, &error); if (error) { @@ -166,9 +167,9 @@ cmumble_audio_create_playback_pipeline(struct cmumble *cm, gst_element_set_state(pipeline, GST_STATE_PLAYING); sink_bin = gst_bin_get_by_name(GST_BIN(pipeline), "sink"); - GstIterator *iter = gst_bin_iterate_sinks(GST_BIN(sink_bin)); - gst_iterator_foreach(iter, set_pulse_states, user); - gst_iterator_free(iter); + it = gst_bin_iterate_sinks(GST_BIN(sink_bin)); + gst_iterator_foreach(it, set_pulse_states, user); + gst_iterator_free(it); /* Setup Celt Decoder */ cmumble_audio_push(cm, user, -- cgit