summaryrefslogtreecommitdiff
path: root/ext/faac
diff options
context:
space:
mode:
authorMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2012-01-12 10:25:48 +0100
committerMark Nauwelaerts <mark.nauwelaerts@collabora.co.uk>2012-01-12 10:25:48 +0100
commitf0668dfdd80ba1609ddecf7173cfbd65494c65ee (patch)
tree9b168695c1e317836d0da2d6e92b6dd80c5d83d1 /ext/faac
parente0494dcaa529bae6baa93b4bb88115e32e927a50 (diff)
downloadgstreamer-plugins-bad-f0668dfdd80ba1609ddecf7173cfbd65494c65ee.tar.gz
faac: also indicate mono audio in sink caps
Diffstat (limited to 'ext/faac')
-rw-r--r--ext/faac/gstfaac.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/ext/faac/gstfaac.c b/ext/faac/gstfaac.c
index a44d886f4..add4a4ff9 100644
--- a/ext/faac/gstfaac.c
+++ b/ext/faac/gstfaac.c
@@ -341,15 +341,14 @@ gst_faac_getcaps (GstAudioEncoder * enc, GstCaps * filter)
t = gst_structure_copy (s);
gst_structure_set (t, "channels", G_TYPE_INT, i, NULL);
- if (i == 1)
- continue;
+ if (i > 1) {
+ for (c = 0; c < i; c++)
+ channel_mask |=
+ G_GUINT64_CONSTANT (1) << aac_channel_positions[i - 1][c];
- for (c = 0; c < i; c++)
- channel_mask |=
- G_GUINT64_CONSTANT (1) << aac_channel_positions[i - 1][c];
-
- gst_structure_set (t, "channel-mask", GST_TYPE_BITMASK, channel_mask,
- NULL);
+ gst_structure_set (t, "channel-mask", GST_TYPE_BITMASK, channel_mask,
+ NULL);
+ }
gst_caps_append_structure (tmp, t);
}
gst_structure_free (s);