summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 19:00:01 +0000
committerscherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-02 19:00:01 +0000
commita3d17f62c2e7d1e5f8c7dafa2b187747b4521892 (patch)
tree65a50f2c357720fba13da367abfa1eaa5e795666 /media
parentf9740c9ab66b3edaa4f7710d3636017ce14d88d6 (diff)
downloadchromium_src-a3d17f62c2e7d1e5f8c7dafa2b187747b4521892.zip
chromium_src-a3d17f62c2e7d1e5f8c7dafa2b187747b4521892.tar.gz
chromium_src-a3d17f62c2e7d1e5f8c7dafa2b187747b4521892.tar.bz2
Remove FFmpegDemuxer::first_seek_hack_ since underlying bugs have been fixed in FFmpeg.
BUG=50460 TEST=layout tests, media tests Review URL: http://codereview.chromium.org/3073004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54574 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/filters/ffmpeg_demuxer.cc13
-rw-r--r--media/filters/ffmpeg_demuxer.h4
-rw-r--r--media/filters/ffmpeg_demuxer_unittest.cc18
3 files changed, 3 insertions, 32 deletions
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 9a088ac..daf083e 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -226,8 +226,7 @@ FFmpegDemuxer::FFmpegDemuxer()
read_event_(false, false),
read_has_failed_(false),
last_read_bytes_(0),
- read_position_(0),
- first_seek_hack_(true) {
+ read_position_(0) {
}
FFmpegDemuxer::~FFmpegDemuxer() {
@@ -485,16 +484,6 @@ void FFmpegDemuxer::SeekTask(base::TimeDelta time, FilterCallback* callback) {
(*iter)->FlushBuffers();
}
- // Do NOT call av_seek_frame() if we were just created. For some reason it
- // causes Ogg+Theora/Vorbis videos to become heavily out of sync.
- //
- // TODO(scherkus): fix the av_seek_frame() hackery!
- if (first_seek_hack_) {
- first_seek_hack_ = false;
- callback->Run();
- return;
- }
-
// Always seek to a timestamp less than or equal to the desired timestamp.
int flags = AVSEEK_FLAG_BACKWARD;
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index 1d754bd..bb52ce4 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -227,10 +227,6 @@ class FFmpegDemuxer : public Demuxer,
size_t last_read_bytes_;
int64 read_position_;
- // If true, then it's our first seek and we won't call av_read_frame(). It's
- // a hack to get around some issue with FFmpeg.
- bool first_seek_hack_;
-
DISALLOW_COPY_AND_ASSIGN(FFmpegDemuxer);
};
diff --git a/media/filters/ffmpeg_demuxer_unittest.cc b/media/filters/ffmpeg_demuxer_unittest.cc
index ea43509..5ac1cbd 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -466,15 +466,7 @@ TEST_F(FFmpegDemuxerTest, Seek) {
EXPECT_CALL(*MockFFmpeg::get(), CheckPoint(1));
-
- // ... then we'll call Seek() to get around the first seek hack...
- //
- // TODO(scherkus): fix the av_seek_frame() hackery!
- StrictMock<MockFilterCallback> hack_callback;
- EXPECT_CALL(hack_callback, OnFilterCallback());
- EXPECT_CALL(hack_callback, OnCallbackDestroyed());
-
- // ...then we'll expect the actual seek call...
+ // ...then we'll expect a seek call...
EXPECT_CALL(*MockFFmpeg::get(),
AVSeekFrame(&format_context_, -1, kExpectedTimestamp, kExpectedFlags))
.WillOnce(Return(0));
@@ -524,13 +516,7 @@ TEST_F(FFmpegDemuxerTest, Seek) {
message_loop_.RunAllPending();
MockFFmpeg::get()->CheckPoint(1);
- // Issue a preliminary seek to get around the "first seek" hack.
- //
- // TODO(scherkus): fix the av_seek_frame() hackery!
- demuxer_->Seek(base::TimeDelta(), hack_callback.NewCallback());
- message_loop_.RunAllPending();
-
- // Now issue a simple forward seek, which should discard queued packets.
+ // Issue a simple forward seek, which should discard queued packets.
demuxer_->Seek(base::TimeDelta::FromMicroseconds(kExpectedTimestamp),
seek_callback.NewCallback());
message_loop_.RunAllPending();