summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/filters/ffmpeg_demuxer.cc11
-rw-r--r--media/filters/ffmpeg_demuxer.h7
-rw-r--r--media/filters/ffmpeg_demuxer_unittest.cc2
3 files changed, 2 insertions, 18 deletions
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 01a6681..8347019 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -264,8 +264,7 @@ FFmpegDemuxer::FFmpegDemuxer(MessageLoop* message_loop)
last_read_bytes_(0),
read_position_(0),
max_duration_(base::TimeDelta::FromMicroseconds(-1)),
- deferred_status_(PIPELINE_OK),
- first_seek_hack_(true) {
+ deferred_status_(PIPELINE_OK) {
DCHECK(message_loop_);
}
@@ -532,14 +531,6 @@ void FFmpegDemuxer::InitializeTask(DataSource* data_source,
void FFmpegDemuxer::SeekTask(base::TimeDelta time, const FilterStatusCB& cb) {
DCHECK_EQ(MessageLoop::current(), message_loop_);
- // TODO(scherkus): remove this by separating Seek() from Flush() from
- // Preroll() states (i.e., the implicit Seek(0) should really be a Preroll()).
- if (first_seek_hack_) {
- first_seek_hack_ = false;
- callback->Run();
- return;
- }
-
// Tell streams to flush buffers due to seeking.
StreamVector::iterator iter;
for (iter = streams_.begin(); iter != streams_.end(); ++iter) {
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index a651ee3..d96622c 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -161,9 +161,6 @@ class FFmpegDemuxer : public Demuxer,
// Provide access to FFmpegDemuxerStream.
MessageLoop* message_loop();
- // For testing purposes.
- void disable_first_seek_hack_for_testing() { first_seek_hack_ = false; }
-
private:
// Only allow a factory to create this class.
friend class MockFFmpegDemuxer;
@@ -249,10 +246,6 @@ class FFmpegDemuxer : public Demuxer,
base::TimeDelta max_duration_;
PipelineStatus deferred_status_;
- // Used to skip the implicit "first seek" to avoid resetting FFmpeg's internal
- // state.
- 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 1234297..74ce0ed 100644
--- a/media/filters/ffmpeg_demuxer_unittest.cc
+++ b/media/filters/ffmpeg_demuxer_unittest.cc
@@ -66,7 +66,7 @@ class FFmpegDemuxerTest : public testing::Test {
FFmpegDemuxerTest() {
// Create an FFmpegDemuxer.
demuxer_ = new FFmpegDemuxer(&message_loop_);
- demuxer_->disable_first_seek_hack_for_testing();
+ DCHECK(demuxer_);
// Inject a filter host and message loop and prepare a data source.
demuxer_->set_host(&host_);