Merge pull request #4940 from TheUbuntuGuy/mono

Fix mono playback on certain configurations
This commit is contained in:
John Maguire 2015-07-06 06:24:11 -04:00
commit fbe310b9b3
1 changed files with 4 additions and 5 deletions

View File

@ -391,11 +391,10 @@ bool GstEnginePipeline::Init() {
// add caps for mono, but only if requested
if (mono_playback_) {
GstCaps* caps32 = gst_caps_new_simple("audio/x-raw", "format",
G_TYPE_STRING, "S32LE", nullptr);
gst_caps_set_simple(caps32, "channels", G_TYPE_INT, 1, nullptr);
gst_element_link_filtered(convert, audiosink_, caps32);
gst_caps_unref(caps32);
GstCaps* capsmono = gst_caps_new_simple("audio/x-raw", "channels",
G_TYPE_INT, 1, nullptr);
gst_element_link_filtered(convert, audiosink_, capsmono);
gst_caps_unref(capsmono);
} else {
gst_element_link(convert, audiosink_);
}