summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/AwesomePlayer.cpp
diff options
context:
space:
mode:
authorGloria Wang <gwang@google.com>2011-08-31 10:24:18 -0700
committerGloria Wang <gwang@google.com>2011-08-31 10:24:18 -0700
commit5b75fdc8fbc026453888cbb2d3fe31345394618b (patch)
tree64023538fcbc1dcee5a89bbdf70db6d63c600d7b /media/libstagefright/AwesomePlayer.cpp
parentb76e90de3c64626fe07a68469d0a59a31c8efb6b (diff)
downloadframeworks_av-5b75fdc8fbc026453888cbb2d3fe31345394618b.zip
frameworks_av-5b75fdc8fbc026453888cbb2d3fe31345394618b.tar.gz
frameworks_av-5b75fdc8fbc026453888cbb2d3fe31345394618b.tar.bz2
Stop the AudioSource in reset() of AwesomePlayer if AudioSource is not NULL
and AudioPlayer was not started. Fix for 5236419. Change-Id: I5eadd069118c3533a19b5d6f6dca2ce16d8505fb
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-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.