summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-18 13:38:49 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-08-18 13:38:49 -0700
commit31eb1ac1db38d0a5cd0b44dd5251941992f74b58 (patch)
treebd58a7b9e74293b91ce76de008c44846de1c0006
parent0899e8bc9dc44249d6be016bed71a9ecee56f132 (diff)
parent0324ce9a1e21ed66e00d6560c27a6faf6d151f68 (diff)
downloadframeworks_base-31eb1ac1db38d0a5cd0b44dd5251941992f74b58.zip
frameworks_base-31eb1ac1db38d0a5cd0b44dd5251941992f74b58.tar.gz
frameworks_base-31eb1ac1db38d0a5cd0b44dd5251941992f74b58.tar.bz2
am 0324ce9a: Merge "Be more lenient when validating ESDS information in mp4 audio tracks. Allow the absence of any codec specific data and assume that the mpeg4 headers are not lying to us." into gingerbread
Merge commit '0324ce9a1e21ed66e00d6560c27a6faf6d151f68' into gingerbread-plus-aosp * commit '0324ce9a1e21ed66e00d6560c27a6faf6d151f68': Be more lenient when validating ESDS information in mp4 audio tracks. Allow the absence of any codec specific data and assume that the mpeg4 headers are not lying to us.
-rw-r--r--media/libstagefright/MPEG4Extractor.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/MPEG4Extractor.cpp b/media/libstagefright/MPEG4Extractor.cpp
index 6af3a7f..12a1e6e 100644
--- a/media/libstagefright/MPEG4Extractor.cpp
+++ b/media/libstagefright/MPEG4Extractor.cpp
@@ -1273,6 +1273,14 @@ status_t MPEG4Extractor::updateAudioTrackInfoFromESDS_MPEG4Audio(
hexdump(csd, csd_size);
#endif
+ if (csd_size == 0) {
+ // There's no further information, i.e. no codec specific data
+ // Let's assume that the information provided in the mpeg4 headers
+ // is accurate and hope for the best.
+
+ return OK;
+ }
+
if (csd_size < 2) {
return ERROR_MALFORMED;
}