diff options
author | Andreas Huber <andih@google.com> | 2011-08-18 10:53:23 -0700 |
---|---|---|
committer | Andreas Huber <andih@google.com> | 2011-08-18 10:53:23 -0700 |
commit | cdef698dae0c6dd89755f6494cc3d4b163f410ef (patch) | |
tree | 915d81d54f93ee501db95be3e07d9c2a537d2fb5 /media/libstagefright/AwesomePlayer.cpp | |
parent | a17b835f5b0bf42f4855fe57aef42799f28f3915 (diff) | |
download | frameworks_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.cpp | 7 |
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) { |