diff options
author | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2012-01-12 10:26:39 +0100 |
---|---|---|
committer | Mark Nauwelaerts <mark.nauwelaerts@collabora.co.uk> | 2012-01-12 10:26:39 +0100 |
commit | 5b785f51caf454d819199079de00b4a3d0034677 (patch) | |
tree | 60d05bf1b2f0634dd6a38ef63f303a0141f3520b | |
parent | f0668dfdd80ba1609ddecf7173cfbd65494c65ee (diff) |
voaacenc: also indicate mono audio in sink caps
-rw-r--r-- | ext/voaacenc/gstvoaacenc.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/voaacenc/gstvoaacenc.c b/ext/voaacenc/gstvoaacenc.c index 489dcbb91..9f48ed840 100644 --- a/ext/voaacenc/gstvoaacenc.c +++ b/ext/voaacenc/gstvoaacenc.c @@ -271,13 +271,14 @@ gst_voaacenc_generate_sink_caps (gpointer data) 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 (caps, t); } |