summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 05:04:21 +0000
committerfbarchard@chromium.org <fbarchard@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-20 05:04:21 +0000
commita36d4cd15a2ad92b47b673c1030742822a75d67f (patch)
tree5233cc841fa1ae46cc9a8b76ca4d9d7ddd7fdd02 /media
parent22bd67815bf2fb991e42357f574bcf94097e6084 (diff)
downloadchromium_src-a36d4cd15a2ad92b47b673c1030742822a75d67f.zip
chromium_src-a36d4cd15a2ad92b47b673c1030742822a75d67f.tar.gz
chromium_src-a36d4cd15a2ad92b47b673c1030742822a75d67f.tar.bz2
media seek to any frame for ffmpeg
BUG=none TEST=should help layout tests when combined with a roll Review URL: http://codereview.chromium.org/2809061 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53004 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'media')
-rw-r--r--media/filters/ffmpeg_demuxer.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 27d8878..5366ffa 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -500,6 +500,10 @@ void FFmpegDemuxer::SeekTask(base::TimeDelta time, FilterCallback* callback) {
flags |= AVSEEK_FLAG_BACKWARD;
}
+ // Explicitly set the behavior of Ogg to be able to seek to any frame.
+ if (!strcmp("ogg", format_context_->iformat->name))
+ flags |= AVSEEK_FLAG_ANY;
+
// Passing -1 as our stream index lets FFmpeg pick a default stream. FFmpeg
// will attempt to use the lowest-index video stream, if present, followed by
// the lowest-index audio stream.