diff options
author | Andreas Huber <andih@google.com> | 2010-01-05 11:13:08 -0800 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2010-01-05 11:13:08 -0800 |
commit | dd0359f7a20c940160b2f93d3c332aaab3ffd7d1 (patch) | |
tree | 68334d4761208f5da1090b5d11aac042c4086948 /media/libstagefright/codecs/aacdec | |
parent | 57d2c3ad1929f0eff7e0abc47c28c09f32ac5494 (diff) | |
download | frameworks_base-dd0359f7a20c940160b2f93d3c332aaab3ffd7d1.zip frameworks_base-dd0359f7a20c940160b2f93d3c332aaab3ffd7d1.tar.gz frameworks_base-dd0359f7a20c940160b2f93d3c332aaab3ffd7d1.tar.bz2 |
Protect against possible temporary objects going away before we get at their data.
Diffstat (limited to 'media/libstagefright/codecs/aacdec')
-rw-r--r-- | media/libstagefright/codecs/aacdec/AACDecoder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/aacdec/AACDecoder.cpp b/media/libstagefright/codecs/aacdec/AACDecoder.cpp index 92059c5..ff51e88 100644 --- a/media/libstagefright/codecs/aacdec/AACDecoder.cpp +++ b/media/libstagefright/codecs/aacdec/AACDecoder.cpp @@ -70,7 +70,8 @@ status_t AACDecoder::start(MetaData *params) { uint32_t type; const void *data; size_t size; - if (mSource->getFormat()->findData(kKeyESDS, &type, &data, &size)) { + sp<MetaData> meta = mSource->getFormat(); + if (meta->findData(kKeyESDS, &type, &data, &size)) { ESDS esds((const char *)data, size); CHECK_EQ(esds.InitCheck(), OK); |