Use default values when MPEG4 audio config parsing fails.

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
diff --git a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
index f9a44f0..aa8ffc6 100644
--- a/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
+++ b/media/libstagefright/rtsp/AMPEG4AudioAssembler.cpp
@@ -311,9 +311,7 @@
 
         case 2:
         {
-            // reserved
-            TRESPASS();
-            break;
+            return ERROR_UNSUPPORTED;
         }
 
         case 3:
@@ -460,6 +458,15 @@
             &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);
 }