From a36d4cd15a2ad92b47b673c1030742822a75d67f Mon Sep 17 00:00:00 2001 From: "fbarchard@chromium.org" Date: Tue, 20 Jul 2010 05:04:21 +0000 Subject: 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 --- media/filters/ffmpeg_demuxer.cc | 4 ++++ 1 file changed, 4 insertions(+) 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. -- cgit v1.1