diff options
author | Xiaoming Yang <xmyang@codeaurora.org> | 2015-05-11 13:48:49 +0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:44 -0600 |
commit | 3b0e43e92b6a81e22e44edabd7688cff8e760500 (patch) | |
tree | 7b8e8b17d0ca47e01d4bda3ce478de7d76f76f48 | |
parent | c8b69ad554f45b779c9fd651b3f3a23b0323ac5f (diff) | |
download | frameworks_av-3b0e43e92b6a81e22e44edabd7688cff8e760500.zip frameworks_av-3b0e43e92b6a81e22e44edabd7688cff8e760500.tar.gz frameworks_av-3b0e43e92b6a81e22e44edabd7688cff8e760500.tar.bz2 |
NuPlayer: Clear stale track packets on seek
EOS isn't notified to nuplayer immediately upon
seek. Stale packets before seeking is still held
by track, thus EOS won't be returned until all
packets are consumed.
To fix this issue and align nuplayer's behavior
with awesome player, stale packets needs to be
cleared on seek.
Change-Id: I00d825cad7a9f3de1daf494078e7379dca8eba2e
CRs-Fixed: 828785
-rw-r--r-- | media/libmediaplayerservice/nuplayer/GenericSource.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/media/libmediaplayerservice/nuplayer/GenericSource.cpp b/media/libmediaplayerservice/nuplayer/GenericSource.cpp index 3b2bcee..4d003d3 100644 --- a/media/libmediaplayerservice/nuplayer/GenericSource.cpp +++ b/media/libmediaplayerservice/nuplayer/GenericSource.cpp @@ -1498,6 +1498,7 @@ void NuPlayer::GenericSource::readBuffer( if (seekTimeUs >= 0) { options.setSeekTo(seekTimeUs, MediaSource::ReadOptions::SEEK_PREVIOUS_SYNC); seeking = true; + track->mPackets->clear(); } if (mIsWidevine) { |