From a6490c65f93e1cbe969fba499978e8d64214108a Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Tue, 22 May 2012 10:51:06 -0700 Subject: Only mark the audio player as started if it did so successfully. Change-Id: I4683f5ca243f9f1b80990028d225d0f6c5973899 related-to-bug: 6500580 --- media/libstagefright/AwesomePlayer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'media') diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp index 5a5a00e..892da92 100644 --- a/media/libstagefright/AwesomePlayer.cpp +++ b/media/libstagefright/AwesomePlayer.cpp @@ -969,8 +969,6 @@ status_t AwesomePlayer::startAudioPlayer_l(bool sendErrorNotification) { } if (!(mFlags & AUDIOPLAYER_STARTED)) { - modifyFlags(AUDIOPLAYER_STARTED, SET); - bool wasSeeking = mAudioPlayer->isSeeking(); // We've already started the MediaSource in order to enable @@ -986,6 +984,8 @@ status_t AwesomePlayer::startAudioPlayer_l(bool sendErrorNotification) { return err; } + modifyFlags(AUDIOPLAYER_STARTED, SET); + if (wasSeeking) { CHECK(!mAudioPlayer->isSeeking()); -- cgit v1.1