summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/media/stagefright/MediaExtractor.h2
-rw-r--r--media/libstagefright/AwesomePlayer.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/include/media/stagefright/MediaExtractor.h b/include/media/stagefright/MediaExtractor.h
index 94090ee..a458284 100644
--- a/include/media/stagefright/MediaExtractor.h
+++ b/include/media/stagefright/MediaExtractor.h
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 The Android Open Source Project
+ * Copyright (c) 2012, The Linux Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -49,6 +50,7 @@ public:
CAN_SEEK_FORWARD = 2, // the "seek 10secs forward button"
CAN_PAUSE = 4,
CAN_SEEK = 8, // the "seek bar"
+ CAN_SEEK_TO_ZERO = 16, // the "previous button"
};
// If subclasses do _not_ override this, the default is
diff --git a/media/libstagefright/AwesomePlayer.cpp b/media/libstagefright/AwesomePlayer.cpp
index 1e2625a..48b6371 100644
--- a/media/libstagefright/AwesomePlayer.cpp
+++ b/media/libstagefright/AwesomePlayer.cpp
@@ -1,5 +1,6 @@
/*
* Copyright (C) 2009 The Android Open Source Project
+ * Copyright (c) 2012, The Linux Foundation. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1297,7 +1298,8 @@ status_t AwesomePlayer::getPosition(int64_t *positionUs) {
status_t AwesomePlayer::seekTo(int64_t timeUs) {
ATRACE_CALL();
- if (mExtractorFlags & MediaExtractor::CAN_SEEK) {
+ if (((timeUs == 0) && (mExtractorFlags & MediaExtractor::CAN_SEEK_TO_ZERO)) ||
+ (mExtractorFlags & MediaExtractor::CAN_SEEK)) {
Mutex::Autolock autoLock(mLock);
return seekTo_l(timeUs);
}