summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2011-04-01 13:36:53 -0700
committerAndreas Huber <andih@google.com>2011-04-01 13:36:53 -0700
commit21796929d37a290f069faad4bd04b356c5579296 (patch)
tree713efe7040f08a24707b333e56a6661cdf2f398b /media
parent827107f4ec7d9a53d7bb6e4071858252f263fa8c (diff)
downloadframeworks_base-21796929d37a290f069faad4bd04b356c5579296.zip
frameworks_base-21796929d37a290f069faad4bd04b356c5579296.tar.gz
frameworks_base-21796929d37a290f069faad4bd04b356c5579296.tar.bz2
Fix a webm-seek issue introduced when adding support for streaming webm
Change-Id: I52ec841832077603ee035f7a648316349513e978 related-to-bug: 4199894
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/matroska/MatroskaExtractor.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/media/libstagefright/matroska/MatroskaExtractor.cpp b/media/libstagefright/matroska/MatroskaExtractor.cpp
index b3e29b9..64266b8 100644
--- a/media/libstagefright/matroska/MatroskaExtractor.cpp
+++ b/media/libstagefright/matroska/MatroskaExtractor.cpp
@@ -291,6 +291,7 @@ void BlockIterator::reset() {
Mutex::Autolock autoLock(mExtractor->mLock);
mCluster = mExtractor->mSegment->GetFirst();
+ mBlockEntry = NULL;
mBlockEntryIndex = 0;
do {
@@ -302,11 +303,13 @@ void BlockIterator::seek(int64_t seekTimeUs) {
Mutex::Autolock autoLock(mExtractor->mLock);
mCluster = mExtractor->mSegment->FindCluster(seekTimeUs * 1000ll);
+ mBlockEntry = NULL;
mBlockEntryIndex = 0;
- while (!eos() && block()->GetTrackNumber() != mTrackNum) {
+ do {
advance_l();
}
+ while (!eos() && block()->GetTrackNumber() != mTrackNum);
while (!eos() && !mBlockEntry->GetBlock()->IsKey()) {
advance_l();