OSDN Git Service

AC3FrameScanner: put bsmod in Pc as per IEC61937
authorPhil Burk <philburk@google.com>
Mon, 28 Mar 2016 22:02:17 +0000 (15:02 -0700)
committerPhil Burk <philburk@google.com>
Mon, 28 Mar 2016 22:02:17 +0000 (15:02 -0700)
Needed for HDMI pass-through.
This detail was missing from earlier streams.

Bug: 22037731
Change-Id: I2df47c4dea779e20104b937164d4b312a1694059
Signed-off-by: Phil Burk <philburk@google.com>
audio_utils/spdif/AC3FrameScanner.cpp

index ffbedb5..c3f98a9 100644 (file)
@@ -181,6 +181,10 @@ bool AC3FrameScanner::parseHeader()
         return false;
     }
 
+    // bitstream mode, main, commentary, etc.
+    uint32_t bsmod = mHeaderBuffer[5] & 7;
+    mDataTypeInfo = bsmod; // as per IEC61937-3, table 3.
+
     // The names fscod, frmsiz are from the AC3 spec.
     uint32_t fscod = mHeaderBuffer[4] >> 6;
     if (mDataType == SPDIF_DATA_TYPE_E_AC3) {