summaryrefslogtreecommitdiffstats
path: root/media/libstagefright
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
commit2ba7ce928b0fa8917ee202836b0963ca58613453 (patch)
tree0d12e36c3fc4aba07dbfc98162b6291fedab2381 /media/libstagefright
parentb7006fcd08e263a8441f1030e5e39fd89dad0129 (diff)
downloadframeworks_av-2ba7ce928b0fa8917ee202836b0963ca58613453.zip
frameworks_av-2ba7ce928b0fa8917ee202836b0963ca58613453.tar.gz
frameworks_av-2ba7ce928b0fa8917ee202836b0963ca58613453.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/libstagefright')
-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();