summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Franzke <benjaminfranzke@googlemail.com>2013-11-22 09:17:10 +0100
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2013-11-22 09:17:10 +0100
commit082293c5df0c99970e28330492cc4d30b0c629c8 (patch)
tree58b9fe37b927d8ab0db5b41b0106799de13dc0a8
parent461d2c08239d52e3d2439236b15e4801ac0857bc (diff)
downloadcmumble-082293c5df0c99970e28330492cc4d30b0c629c8.tar.gz
cmumble-082293c5df0c99970e28330492cc4d30b0c629c8.tar.bz2
cmumble-082293c5df0c99970e28330492cc4d30b0c629c8.zip
audio.c: Move variable declaration before code
-rw-r--r--src/audio.c7
1 files changed, 4 insertions, 3 deletions
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,