summaryrefslogtreecommitdiffstats
path: root/media/base/clock_impl.cc
diff options
context:
space:
mode:
authorhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 01:56:53 +0000
committerhclam@chromium.org <hclam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-08-21 01:56:53 +0000
commit81fb2509ea1038d04a373a1045c7658927ad85b5 (patch)
tree51de6aa44142c71baf9d35e39f417317cd7d310a /media/base/clock_impl.cc
parent2125f7df5af31857e7698264ed42e616d8271b63 (diff)
downloadchromium_src-81fb2509ea1038d04a373a1045c7658927ad85b5.zip
chromium_src-81fb2509ea1038d04a373a1045c7658927ad85b5.tar.gz
chromium_src-81fb2509ea1038d04a373a1045c7658927ad85b5.tar.bz2
Suppress slider thumb jumping around during seeking
BUG=19396 TEST=Open a video, seek to any position, the thumb should stops a bit and then goes forward from there. Preventing the slider thumb from jumping around after seek by freezing the clock until we get a valid time update from the audio renderer. Review URL: http://codereview.chromium.org/173072 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media/base/clock_impl.cc')
-rw-r--r--media/base/clock_impl.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/media/base/clock_impl.cc b/media/base/clock_impl.cc
index cc46568..b853742 100644
--- a/media/base/clock_impl.cc
+++ b/media/base/clock_impl.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/logging.h"
+#include "media/base/buffers.h"
#include "media/base/clock_impl.h"
namespace media {
@@ -32,6 +33,10 @@ base::TimeDelta ClockImpl::Pause() {
}
void ClockImpl::SetTime(const base::TimeDelta& time) {
+ if (time == StreamSample::kInvalidTimestamp) {
+ NOTREACHED();
+ return;
+ }
if (playing_) {
reference_ = time_provider_();
}