iec61937: set iec958 boolean before use it
During prepare alsa->iec958 is tested before set.
Effect is that alsa device is not opened in iec958 mode,
so AES value are not transmitted to alsa driver.
https://bugzilla.gnome.org/show_bug.cgi?id=757258
Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c
index 756b1a2..d6d287b 100644
--- a/ext/alsa/gstalsasink.c
+++ b/ext/alsa/gstalsasink.c
@@ -894,6 +894,9 @@
alsa = GST_ALSA_SINK (asink);
+ if (!alsasink_parse_spec (alsa, spec))
+ goto spec_parse;
+
if (alsa->iec958) {
snd_pcm_close (alsa->handle);
alsa->handle = gst_alsa_open_iec958_pcm (GST_OBJECT (alsa), alsa->device);
@@ -902,9 +905,6 @@
}
}
- if (!alsasink_parse_spec (alsa, spec))
- goto spec_parse;
-
CHECK (set_hwparams (alsa), hw_params_failed);
CHECK (set_swparams (alsa), sw_params_failed);