[Bug 697463] rtpsbcdebay: incorrect frame length calculation for dual channel.

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Sun Apr 7 15:32:31 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=697463
  GStreamer | gst-plugins-good | unspecified

--- Comment #3 from andreas.fenkart at streamunlimited.com 2013-04-07 22:32:25 UTC ---
Thanks for the pointer, I was wrong.
Actually I doubt the IPad uses dual channel at all. It probably sends it as
Stereo, but due endianness issues, it is interpret as dual channel.

bit0 in spec is bit1 in host machine register, at least
that's how it's in used block/subband calculation. Only for
channel_mode bit0 is mapped to bit0 of host machine register.

>From draft-ietf-payload-rtp-sbc:

       CHANNEL_MODE (2 bits): These two bits indicate with which channel
                 mode the frame has been encoded. The number of channels
                 depends on this information. The channel mode MUST NOT be
                 changed without changing the payload type, too.

       +--------------+--------------+-----------+
       | CHANNEL_MODE | channel mode | number of |
       |    bit 0 1   |              | channels  |
       +--------------+--------------+-----------+
       |        0 0   | MONO         |     1     |
       |        0 1   | DUAL_CHANNEL |     2     |
       |        1 0   | STEREO       |     2     |
       |        1 1   | JOINT_STEREO |     2     |
       +--------------+--------------+-----------+


--- a/gst/rtp/gstrtpsbcdepay.c
+++ b/gst/rtp/gstrtpsbcdepay.c
@@ -142,7 +142,7 @@ gst_rtp_sbc_depay_get_params (GstRtpSbcDepay * depay, const
guint8 * data,

   length = 4 + ((4 * subbands * channels) / 8);

-  if (!(channel_mode & 0x1)) {
+  if (!(channel_mode & 0x2)) {
     /* Mono || Dual channel */
     length += ((blocks * channels * bitpool)
         + 4 /* round up */ ) / 8;

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list