summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2014-12-02 09:41:21 -0800
committerWei Jia <wjia@google.com>2014-12-02 17:43:39 -0800
commitab05b4ccb8ea59079d7f773aa0e090029c479bad (patch)
tree71c6ac716e4845c6bab413c4e55dd60631be4a96 /media/libmediaplayerservice/nuplayer/StreamingSource.cpp
parentf1828910d48bbd22e1392e6ab0ce31298d1f115c (diff)
downloadframeworks_av-ab05b4ccb8ea59079d7f773aa0e090029c479bad.zip
frameworks_av-ab05b4ccb8ea59079d7f773aa0e090029c479bad.tar.gz
frameworks_av-ab05b4ccb8ea59079d7f773aa0e090029c479bad.tar.bz2
StreamingSource: check mTSParser before dereferencing it.
Bug: 18532335 Change-Id: I7819d8d359fe75ea4c827138e9aaa2454ccfe3b1
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/StreamingSource.cpp')
-rw-r--r--media/libmediaplayerservice/nuplayer/StreamingSource.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
index 27f5159..e54f5b9 100644
--- a/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
+++ b/media/libmediaplayerservice/nuplayer/StreamingSource.cpp
@@ -139,6 +139,10 @@ status_t NuPlayer::StreamingSource::feedMoreTSData() {
}
sp<MetaData> NuPlayer::StreamingSource::getFormatMeta(bool audio) {
+ if (mTSParser == NULL) {
+ return NULL;
+ }
+
ATSParser::SourceType type =
audio ? ATSParser::AUDIO : ATSParser::VIDEO;