summaryrefslogtreecommitdiffstats
path: root/audio/gstsbcutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/gstsbcutil.c')
-rw-r--r--audio/gstsbcutil.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/audio/gstsbcutil.c b/audio/gstsbcutil.c
index 78024f7e..e5d21af0 100644
--- a/audio/gstsbcutil.c
+++ b/audio/gstsbcutil.c
@@ -364,9 +364,12 @@ GstCaps* gst_sbc_util_caps_fixate(GstCaps *caps, gchar** error_message)
goto error;
} else {
value = gst_structure_get_value(structure, "mode");
- if (GST_VALUE_HOLDS_LIST(value))
- mode = gst_sbc_get_mode_from_list(value);
- else
+ if (GST_VALUE_HOLDS_LIST(value)) {
+ if (channels == 1)
+ mode = "mono";
+ else
+ mode = gst_sbc_get_mode_from_list(value);
+ } else
mode = g_value_get_string(value);
}