summaryrefslogtreecommitdiffstats
path: root/media/libmedia
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-11-27 14:29:13 -0800
committerEric Laurent <elaurent@google.com>2013-11-27 14:29:13 -0800
commita4f24ff9b239300b4bb2098c1413c0a60edc2d7e (patch)
tree1b328f28835885a21e67780129d6764f5b4384a9 /media/libmedia
parent5ea5b020b311a68f513d4a40aca5551abc6a07d8 (diff)
downloadframeworks_av-a4f24ff9b239300b4bb2098c1413c0a60edc2d7e.zip
frameworks_av-a4f24ff9b239300b4bb2098c1413c0a60edc2d7e.tar.gz
frameworks_av-a4f24ff9b239300b4bb2098c1413c0a60edc2d7e.tar.bz2
AudioTrack: fix position callback after restore
When restoring an AudioTrack, the next position callback point should not be modified and set ahead of current buffer head. Otherwise, as frames are dropped, the new position is never reached and an application relying on position callbacks to reload the buffer would be stalled. Bug: 11868603. Change-Id: I93b2a311642a0c89944b78bcc0482d4ceed98ae4
Diffstat (limited to 'media/libmedia')
-rw-r--r--media/libmedia/AudioTrack.cpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/media/libmedia/AudioTrack.cpp b/media/libmedia/AudioTrack.cpp
index b8a89a0..7c4a990 100644
--- a/media/libmedia/AudioTrack.cpp
+++ b/media/libmedia/AudioTrack.cpp
@@ -1675,7 +1675,6 @@ status_t AudioTrack::restoreTrack_l(const char *from)
// take the frames that will be lost by track recreation into account in saved position
size_t position = mProxy->getPosition() + mProxy->getFramesFilled();
- mNewPosition = position + mUpdatePeriod;
size_t bufferPosition = mStaticProxy != NULL ? mStaticProxy->getBufferPosition() : 0;
result = createTrack_l(mStreamType,
mSampleRate,