summaryrefslogtreecommitdiffstats
path: root/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
diff options
context:
space:
mode:
authorChong Zhang <chz@google.com>2015-02-04 23:24:38 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-02-04 23:24:38 +0000
commit13cfe85ae9f4daab1d0bfcd248fc2576585e259a (patch)
treef12d2ac589e97085e5ef6f8f47655ee69479c011 /media/libmediaplayerservice/nuplayer/NuPlayer.cpp
parent0662f5b0c43fcfdf055704d02ea41202c9b6094a (diff)
parent341ab6eebb6a992ec7bdf095420cf82bcab1c6b3 (diff)
downloadframeworks_av-13cfe85ae9f4daab1d0bfcd248fc2576585e259a.zip
frameworks_av-13cfe85ae9f4daab1d0bfcd248fc2576585e259a.tar.gz
frameworks_av-13cfe85ae9f4daab1d0bfcd248fc2576585e259a.tar.bz2
Merge "reuse CCDecoder on video discontinuity" into lmp-mr1-dev
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayer.cpp')
-rw-r--r--media/libmediaplayerservice/nuplayer/NuPlayer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
index 1f55706..fb8dbce 100644
--- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
+++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp
@@ -1201,7 +1201,9 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp<DecoderBase> *decoder) {
CHECK(format->findString("mime", &mime));
sp<AMessage> ccNotify = new AMessage(kWhatClosedCaptionNotify, id());
- mCCDecoder = new CCDecoder(ccNotify);
+ if (mCCDecoder == NULL) {
+ mCCDecoder = new CCDecoder(ccNotify);
+ }
if (mSourceFlags & Source::FLAG_SECURE) {
format->setInt32("secure", true);