summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/AwesomePlayer.cpp
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-08-18 10:53:23 -0700
committerAndreas Huber <andih@google.com>2011-08-18 10:53:23 -0700
commitcdef698dae0c6dd89755f6494cc3d4b163f410ef (patch)
tree915d81d54f93ee501db95be3e07d9c2a537d2fb5 /media/libstagefright/AwesomePlayer.cpp
parenta17b835f5b0bf42f4855fe57aef42799f28f3915 (diff)
downloadframeworks_av-cdef698dae0c6dd89755f6494cc3d4b163f410ef.zip
frameworks_av-cdef698dae0c6dd89755f6494cc3d4b163f410ef.tar.gz
frameworks_av-cdef698dae0c6dd89755f6494cc3d4b163f410ef.tar.bz2
Disable vorbis-auto-looping if the audio sink used is not realtime, i.e. recording.
Change-Id: I982e740e8488ff8717ca5f081db9def55aabc9ec related-to-bug: 5179033
Diffstat (limited to 'media/libstagefright/AwesomePlayer.cpp')
-rw-r--r--media/libstagefright/AwesomePlayer.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 99242ab..7b28588 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -820,7 +820,12 @@ void AwesomePlayer::onStreamDone() {
return;
}
- if (mFlags & (LOOPING | AUTO_LOOPING)) {
+ if ((mFlags & LOOPING)
+ || ((mFlags & AUTO_LOOPING)
+ && (mAudioSink == NULL || mAudioSink->realtime()))) {
+ // Don't AUTO_LOOP if we're being recorded, since that cannot be
+ // turned off and recording would go on indefinitely.
+
seekTo_l(0);
if (mVideoSource != NULL) {