diff options
author | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-01-30 14:21:43 +0000 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.dentz@openbossa.org> | 2008-01-30 14:21:43 +0000 |
commit | 3ad6867c8c7251c3192378a1a0e2ed937ee47d1b (patch) | |
tree | 879d3e37febab470e4b46c01f8b627dfd79308ae /audio/gstsbcutil.c | |
parent | a104e5ff05aa758b5499b316d1923f1c83915e55 (diff) |
Fixes gstreamer caps and code cleanup.
Diffstat (limited to 'audio/gstsbcutil.c')
-rw-r--r-- | audio/gstsbcutil.c | 9 |
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); } |