MPEG4 audio packets may be multiplexed using the so called
LATM (Low Overhead Audio Transport Multiplex) scheme.
LATM parsing was recently introduced in Stagefright and it
has caused issues in cases when the LATM config element
cannot be parsed correctly. The main problem occurrs when
the AudioSpecificConfig part of the config element contains
more information than what is expected, causing the
frameLengthType parameter to get the wrong value. This fix
introduces default values of some config parameters that are
used in case config parsing fails.
Change-Id: I3cb35df76826f95ca0831dc08c2a1e7c6c2c586d
case 2:
{
- // reserved
- TRESPASS();
- break;
+ return ERROR_UNSUPPORTED;
}
case 3:
&mFixedFrameLength,
&mOtherDataPresent, &mOtherDataLenBits);
+ if (err == ERROR_UNSUPPORTED) {
+ ALOGW("Failed to parse stream mux config, using default values for playback.");
+ mMuxConfigPresent = false;
+ mNumSubFrames = 0;
+ mFrameLengthType = 0;
+ mOtherDataPresent = false;
+ mOtherDataLenBits = 0;
+ return;
+ }
CHECK_EQ(err, (status_t)NO_ERROR);
}