diff options
author | Andreas Huber <andih@google.com> | 2010-04-12 16:05:57 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-04-12 16:05:57 -0700 |
commit | 81f82c32459029bf0744e28c73f95a7f18cab5ac (patch) | |
tree | 7bc1f309ecd5f3d7ce4f3377837ccd3cb7728bbf /media/libstagefright/ESDS.cpp | |
parent | 874b55f51c4c062c65aee043ec0f26044b504556 (diff) | |
download | frameworks_av-81f82c32459029bf0744e28c73f95a7f18cab5ac.zip frameworks_av-81f82c32459029bf0744e28c73f95a7f18cab5ac.tar.gz frameworks_av-81f82c32459029bf0744e28c73f95a7f18cab5ac.tar.bz2 |
Distinguish QCELP audio from mpeg4 audio, ignore QCELP audio tracks since we don't have a decoder for it, ignore potentially malformed metadata for AMR NB and WB tracks.
Change-Id: Ic9a9198413431db4ea40bb63b9de91aa8a7183af
related-to-bug: 2587341
Diffstat (limited to 'media/libstagefright/ESDS.cpp')
-rw-r--r-- | media/libstagefright/ESDS.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/media/libstagefright/ESDS.cpp b/media/libstagefright/ESDS.cpp index 28d338c..b7c8e0c 100644 --- a/media/libstagefright/ESDS.cpp +++ b/media/libstagefright/ESDS.cpp @@ -25,7 +25,8 @@ ESDS::ESDS(const void *data, size_t size) mSize(size), mInitCheck(NO_INIT), mDecoderSpecificOffset(0), - mDecoderSpecificLength(0) { + mDecoderSpecificLength(0), + mObjectTypeIndication(0) { memcpy(mData, data, size); mInitCheck = parse(); @@ -40,6 +41,16 @@ status_t ESDS::InitCheck() const { return mInitCheck; } +status_t ESDS::getObjectTypeIndication(uint8_t *objectTypeIndication) const { + if (mInitCheck != OK) { + return mInitCheck; + } + + *objectTypeIndication = mObjectTypeIndication; + + return OK; +} + status_t ESDS::getCodecSpecificInfo(const void **data, size_t *size) const { if (mInitCheck != OK) { return mInitCheck; @@ -164,6 +175,8 @@ status_t ESDS::parseDecoderConfigDescriptor(size_t offset, size_t size) { return ERROR_MALFORMED; } + mObjectTypeIndication = mData[offset]; + offset += 13; size -= 13; |