summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-08-31 10:37:48 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-31 10:37:48 -0700
commite31f4f78729f66b3a90f51671ad557b551ed0bea (patch)
tree349610917fc80daee815b848e58a0ae5cf3fefae /media
parent935456794a8d572368ebe942d13451f7d71a9f4e (diff)
parent5b75fdc8fbc026453888cbb2d3fe31345394618b (diff)
downloadframeworks_av-e31f4f78729f66b3a90f51671ad557b551ed0bea.zip
frameworks_av-e31f4f78729f66b3a90f51671ad557b551ed0bea.tar.gz
frameworks_av-e31f4f78729f66b3a90f51671ad557b551ed0bea.tar.bz2
Merge "Stop the AudioSource in reset() of AwesomePlayer if AudioSource is not NULL and AudioPlayer was not started. Fix for 5236419."
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/AwesomePlayer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 142dda0..f98b0de 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -513,7 +513,8 @@ void AwesomePlayer::reset_l() {
// If we did this later, audio would continue playing while we
// shutdown the video-related resources and the player appear to
// not be as responsive to a reset request.
- if (mAudioPlayer == NULL && mAudioSource != NULL) {
+ if ((mAudioPlayer == NULL || !(mFlags & AUDIOPLAYER_STARTED))
+ && mAudioSource != NULL) {
// If we had an audio player, it would have effectively
// taken possession of the audio source and stopped it when
// _it_ is stopped. Otherwise this is still our responsibility.