From 9c29cd70eee65fffc76ac8938016ad0d2165ea22 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Fri, 25 May 2012 15:57:45 +0530 Subject: [PATCH] audio: Fix DTS IEC61937 payloading DTS type I-III specify the burst length in bits. Only type IV (which we do not currently support) needs it to be specified in bytes. Thanks to Julien Moutte for pointing this out. --- gst-libs/gst/audio/gstaudioiec61937.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/audio/gstaudioiec61937.c b/gst-libs/gst/audio/gstaudioiec61937.c index 983d58ec7..48837f5db 100644 --- a/gst-libs/gst/audio/gstaudioiec61937.c +++ b/gst-libs/gst/audio/gstaudioiec61937.c @@ -236,9 +236,10 @@ gst_audio_iec61937_payload (const guint8 * src, guint src_n, guint8 * dst, * bit 0-4 - data type (11 = type I, 12 = type II, * 13 = type III) */ dst[five] = 11 + (blocksize / 1024); - /* Pd: bit 15-0 - frame size in bytes */ - dst[six] = ((guint16) src_n) >> 8; - dst[seven] = ((guint16) src_n) & 0xff; + /* Pd: bit 15-0 - frame size, in bits (for type I-III) */ + tmp = src_n * 8; + dst[six] = ((guint16) tmp) >> 8; + dst[seven] = ((guint16) tmp) & 0xff; break; } -- 2.34.1