summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2014-07-11 01:05:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-07-10 20:43:36 +0000
commit94bda64006ed4b5c2c19634a206d29ea936fa81b (patch)
tree0d223e7c0f0eba6da012ce5e968c3bb456f194a5 /media
parent8346bf5c2dd059c5451706ef1b906cb34d5175cd (diff)
parentcd249c40c51584e89e065bf7d51999b04db2eb57 (diff)
downloadframeworks_av-94bda64006ed4b5c2c19634a206d29ea936fa81b.zip
frameworks_av-94bda64006ed4b5c2c19634a206d29ea936fa81b.tar.gz
frameworks_av-94bda64006ed4b5c2c19634a206d29ea936fa81b.tar.bz2
Merge "Check meta before dereferencing it."
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/Utils.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/media/libstagefright/Utils.cpp b/media/libstagefright/Utils.cpp
index 5771c6c..8c5deb3 100644
--- a/media/libstagefright/Utils.cpp
+++ b/media/libstagefright/Utils.cpp
@@ -613,6 +613,9 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
bool isStreaming, audio_stream_type_t streamType)
{
const char *mime;
+ if (meta == NULL) {
+ return false;
+ }
CHECK(meta->findCString(kKeyMIMEType, &mime));
audio_offload_info_t info = AUDIO_INFO_INITIALIZER;