Loading media/libmediaplayerservice/nuplayer/NuPlayer.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -1048,9 +1048,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } else { ALOGW("resume called when source is gone or not set"); } // |mAudioDecoder| may have been released due to the pause timeout, so try to re-create // it if needed. if (mFlushingAudio != SHUT_DOWN) { // |mAudioDecoder| may have been released due to the pause timeout, so re-create it if // needed. if (audioDecoderStillNeeded() && mAudioDecoder == NULL) { instantiateDecoder(true /* audio */, &mAudioDecoder); } if (mRenderer != NULL) { Loading Loading @@ -1079,6 +1079,11 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } } bool NuPlayer::audioDecoderStillNeeded() { // Audio decoder is no longer needed if it's in shut/shutting down status. return ((mFlushingAudio != SHUT_DOWN) && (mFlushingAudio != SHUTTING_DOWN_DECODER)); } void NuPlayer::finishFlushIfPossible() { if (mFlushingAudio != NONE && mFlushingAudio != FLUSHED && mFlushingAudio != SHUT_DOWN) { Loading media/libmediaplayerservice/nuplayer/NuPlayer.h +2 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,8 @@ private: void finishFlushIfPossible(); bool audioDecoderStillNeeded(); void flushDecoder( bool audio, bool needShutdown, const sp<AMessage> &newFormat = NULL); void updateDecoderFormatWithoutFlush(bool audio, const sp<AMessage> &format); Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayer.cpp +8 −3 Original line number Diff line number Diff line Loading @@ -1048,9 +1048,9 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } else { ALOGW("resume called when source is gone or not set"); } // |mAudioDecoder| may have been released due to the pause timeout, so try to re-create // it if needed. if (mFlushingAudio != SHUT_DOWN) { // |mAudioDecoder| may have been released due to the pause timeout, so re-create it if // needed. if (audioDecoderStillNeeded() && mAudioDecoder == NULL) { instantiateDecoder(true /* audio */, &mAudioDecoder); } if (mRenderer != NULL) { Loading Loading @@ -1079,6 +1079,11 @@ void NuPlayer::onMessageReceived(const sp<AMessage> &msg) { } } bool NuPlayer::audioDecoderStillNeeded() { // Audio decoder is no longer needed if it's in shut/shutting down status. return ((mFlushingAudio != SHUT_DOWN) && (mFlushingAudio != SHUTTING_DOWN_DECODER)); } void NuPlayer::finishFlushIfPossible() { if (mFlushingAudio != NONE && mFlushingAudio != FLUSHED && mFlushingAudio != SHUT_DOWN) { Loading
media/libmediaplayerservice/nuplayer/NuPlayer.h +2 −0 Original line number Diff line number Diff line Loading @@ -203,6 +203,8 @@ private: void finishFlushIfPossible(); bool audioDecoderStillNeeded(); void flushDecoder( bool audio, bool needShutdown, const sp<AMessage> &newFormat = NULL); void updateDecoderFormatWithoutFlush(bool audio, const sp<AMessage> &format); Loading