summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Extractor.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-08-18 09:58:30 -0700
committerAndreas Huber <andih@google.com>2010-08-18 09:58:30 -0700
commita65ccbff6e8eb301c0d325b2ec080aeda8df2024 (patch)
treee76792164c0e05971b5d922b266121a54286a8fa /media/libstagefright/MPEG4Extractor.cpp
parentc059860c73678a202bfa33062723e8f82fb779d9 (diff)
downloadframeworks_av-a65ccbff6e8eb301c0d325b2ec080aeda8df2024.zip
frameworks_av-a65ccbff6e8eb301c0d325b2ec080aeda8df2024.tar.gz
frameworks_av-a65ccbff6e8eb301c0d325b2ec080aeda8df2024.tar.bz2
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.
Change-Id: Ia29b967cbee9eabb21c6c26508b27b379ff9ba17
Diffstat (limited to 'media/libstagefright/MPEG4Extractor.cpp')
-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;
}