From 7f56833125e3055eb45d371fc0f5fa85ac74cdef Mon Sep 17 00:00:00 2001 From: Arnaud Bienner Date: Mon, 21 May 2012 02:07:00 +0200 Subject: [PATCH] Nicer 'if' block for setting monoplayback --- src/engines/gstenginepipeline.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp index ee82b22ea..c2322e6eb 100644 --- a/src/engines/gstenginepipeline.cpp +++ b/src/engines/gstenginepipeline.cpp @@ -333,8 +333,10 @@ bool GstEnginePipeline::Init() { NULL); GstCaps* caps32 = gst_caps_new_simple ("audio/x-raw-float", "width", G_TYPE_INT, 32, - !mono_playback_ ? NULL : "channels", G_TYPE_INT, 1, NULL); + if (mono_playback_) { + gst_caps_set_simple(caps32, "channels", G_TYPE_INT, 1, NULL); + } // Link the elements with special caps gst_element_link_filtered(probe_converter, probe_sink, caps16);