voaacenc: also indicate mono audio in sink caps

This commit is contained in:
Mark Nauwelaerts 2012-01-12 10:26:39 +01:00
parent f0668dfdd8
commit 5b785f51ca

View file

@ -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);
}