[0.11] gst-plugins-bad: voaacenc: also indicate mono audio in sink caps

Mark Nauwelaerts mnauw at kemper.freedesktop.org
Thu Jan 12 01:27:48 PST 2012


Module: gst-plugins-bad
Branch: 0.11
Commit: 5b785f51caf454d819199079de00b4a3d0034677
URL:    http://cgit.freedesktop.org/gstreamer/gst-plugins-bad/commit/?id=5b785f51caf454d819199079de00b4a3d0034677

Author: Mark Nauwelaerts <mark.nauwelaerts at collabora.co.uk>
Date:   Thu Jan 12 10:26:39 2012 +0100

voaacenc: also indicate mono audio in sink caps

---

 ext/voaacenc/gstvoaacenc.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/ext/voaacenc/gstvoaacenc.c b/ext/voaacenc/gstvoaacenc.c
index 489dcbb..9f48ed8 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);
   }
 



More information about the gstreamer-commits mailing list