summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/codecs/aacdec/AACDecoder.cpp3
-rw-r--r--media/libstagefright/codecs/avc/dec/AVCDecoder.cpp3
-rw-r--r--media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp5
3 files changed, 7 insertions, 4 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);
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;
diff --git a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
index ec3ad47..40009f8 100644
--- a/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
+++ b/media/libstagefright/codecs/m4v_h263/dec/M4vH263Decoder.cpp
@@ -87,7 +87,8 @@ status_t M4vH263Decoder::start(MetaData *) {
CHECK(!mStarted);
const char *mime = NULL;
- CHECK(mSource->getFormat()->findCString(kKeyMIMEType, &mime));
+ sp<MetaData> meta = mSource->getFormat();
+ CHECK(meta->findCString(kKeyMIMEType, &mime));
MP4DecodingMode mode;
if (!strcasecmp(MEDIA_MIMETYPE_VIDEO_MPEG4, mime)) {
@@ -102,7 +103,7 @@ status_t M4vH263Decoder::start(MetaData *) {
size_t size = 0;
uint8_t *vol_data[1] = {0};
int32_t vol_size = 0;
- if (mSource->getFormat()->findData(kKeyESDS, &type, &data, &size)) {
+ if (meta->findData(kKeyESDS, &type, &data, &size)) {
ESDS esds((const uint8_t *)data, size);
CHECK_EQ(esds.InitCheck(), OK);