From 341ab6eebb6a992ec7bdf095420cf82bcab1c6b3 Mon Sep 17 00:00:00 2001 From: Chong Zhang Date: Wed, 4 Feb 2015 13:37:18 -0800 Subject: reuse CCDecoder on video discontinuity bug: 19266084 Change-Id: I06ef57b09b048a85f77be4dee27599c4f60aacc9 --- media/libmediaplayerservice/nuplayer/NuPlayer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'media/libmediaplayerservice') diff --git a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp index e02a2d5..3b472a2 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayer.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayer.cpp @@ -1185,7 +1185,9 @@ status_t NuPlayer::instantiateDecoder(bool audio, sp *decoder) { CHECK(format->findString("mime", &mime)); sp 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); -- cgit v1.1