diff options
author | Haynes Mathew George <hgeorge@codeaurora.org> | 2015-10-21 16:38:43 -0700 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2015-10-25 08:33:51 -0700 |
commit | 788add7a8de76ff057858021741f3988ba966b71 (patch) | |
tree | fcb81e813b90ae2ebab89f38b7d3d1dcf6ec5398 /media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp | |
parent | db91f16dcfa6b34a6802ae4daf280d34a09a9cf3 (diff) | |
download | frameworks_av-788add7a8de76ff057858021741f3988ba966b71.zip frameworks_av-788add7a8de76ff057858021741f3988ba966b71.tar.gz frameworks_av-788add7a8de76ff057858021741f3988ba966b71.tar.bz2 |
NuPlayer: Decoder: Check for valid codec on resume
The MediaCodec member associated with an NuPlayerDecoder
is cleared if configure fails. A pending seek operation in
NuPlayer can issue a ResumeDecoderAction. Add a NULL
check before accessing the MediaCodec instance to handle
this resume.
Change-Id: Idc6c15168ec922ca1bd6d867cbe59847647c6f26
CRs-Fixed: 913215
Diffstat (limited to 'media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp')
-rw-r--r-- | media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp index f83eaf6..baea834 100644 --- a/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp +++ b/media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp @@ -364,7 +364,14 @@ void NuPlayer::Decoder::onResume(bool notifyComplete) { if (notifyComplete) { mResumePending = true; } - mCodec->start(); + + if (mCodec != NULL) { + mCodec->start(); + } else { + ALOGW("Decoder %s onResume without a valid codec object", + mComponentName.c_str()); + handleError(NO_INIT); + } } void NuPlayer::Decoder::doFlush(bool notifyComplete) { |