summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2012-05-22 10:03:57 -0700
committerAndreas Huber <andih@google.com>2012-05-22 10:03:57 -0700
commit4575beb3dea80e271eaa6619234fdc02e914e6e6 (patch)
tree72298a4b145f785457666a86e0df1d63cd47733a
parentc9ef89cd40bea216046ed28e5366f8ac361d3dd4 (diff)
downloadframeworks_av-4575beb3dea80e271eaa6619234fdc02e914e6e6.zip
frameworks_av-4575beb3dea80e271eaa6619234fdc02e914e6e6.tar.gz
frameworks_av-4575beb3dea80e271eaa6619234fdc02e914e6e6.tar.bz2
Revert "Stop audio source if AudioPlayer could not be started"
This reverts commit 022048e95f3f1d65cb776cf21de2001423fcf7d9.
-rw-r--r--media/libstagefright/AudioPlayer.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/media/libstagefright/AudioPlayer.cpp b/media/libstagefright/AudioPlayer.cpp
index 6b1be1f..4208019 100644
--- a/media/libstagefright/AudioPlayer.cpp
+++ b/media/libstagefright/AudioPlayer.cpp
@@ -142,10 +142,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
mFirstBuffer = NULL;
}
- // At this point, source already got started
- // Stop the source when error is found.
- mSource->stop();
- mSource = NULL;
+ if (!sourceAlreadyStarted) {
+ mSource->stop();
+ }
return err;
}
@@ -175,9 +174,9 @@ status_t AudioPlayer::start(bool sourceAlreadyStarted) {
mFirstBuffer = NULL;
}
- // At this point, source already got started
- // Stop the source when error is found.
- mSource->stop();
+ if (!sourceAlreadyStarted) {
+ mSource->stop();
+ }
return err;
}