From d992f49cb706c2524dde646429505f45f5b9f008 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 5 Jul 2016 09:21:58 -0400 Subject: [PATCH] webrtcdsp: Workaround GCC/MingW 4.7 limitations It refuses to initialize a classes using brackets notation. This is to allow building using our mingw version. --- ext/webrtcdsp/gstwebrtcdsp.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/ext/webrtcdsp/gstwebrtcdsp.cpp b/ext/webrtcdsp/gstwebrtcdsp.cpp index fa974e0f8c..f64b623d53 100644 --- a/ext/webrtcdsp/gstwebrtcdsp.cpp +++ b/ext/webrtcdsp/gstwebrtcdsp.cpp @@ -458,16 +458,18 @@ gst_webrtc_dsp_setup (GstAudioFilter * filter, const GstAudioInfo * info) GST_WEBRTC_ECHO_PROBE_UNLOCK (self->probe); } - pconfig = { - /* input stream */ - webrtc::StreamConfig (info->rate, info->channels, false), - /* output stream */ - webrtc::StreamConfig (info->rate, info->channels, false), - /* reverse input stream */ - webrtc::StreamConfig (probe_info.rate, probe_info.channels, false), - /* reverse output stream */ - webrtc::StreamConfig (probe_info.rate, probe_info.channels, false), - }; + /* input stream */ + pconfig.streams[webrtc::ProcessingConfig::kInputStream] = + webrtc::StreamConfig (info->rate, info->channels, false); + /* output stream */ + pconfig.streams[webrtc::ProcessingConfig::kOutputStream] = + webrtc::StreamConfig (info->rate, info->channels, false); + /* reverse input stream */ + pconfig.streams[webrtc::ProcessingConfig::kReverseInputStream] = + webrtc::StreamConfig (probe_info.rate, probe_info.channels, false); + /* reverse output stream */ + pconfig.streams[webrtc::ProcessingConfig::kReverseOutputStream] = + webrtc::StreamConfig (probe_info.rate, probe_info.channels, false); if ((err = apm->Initialize (pconfig)) < 0) goto initialize_failed;