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/avc | |
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/avc')
-rw-r--r-- | media/libstagefright/codecs/avc/dec/AVCDecoder.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp index 22e6188..229e933 100644 --- a/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp +++ b/media/libstagefright/codecs/avc/dec/AVCDecoder.cpp @@ -90,7 +90,8 @@ status_t AVCDecoder::start(MetaData *) { uint32_t type; const void *data; size_t size; - if (mSource->getFormat()->findData(kKeyAVCC, &type, &data, &size)) { + sp<MetaData> meta = mSource->getFormat(); + if (meta->findData(kKeyAVCC, &type, &data, &size)) { // Parse the AVCDecoderConfigurationRecord const uint8_t *ptr = (const uint8_t *)data; |