Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(502)

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 12209111: Set AVFMT_FLAG_GENPTS when demuxing AVI content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 56929bcf05172823e0aab9b2ba7d8fe64e4c81b2..f1b03852d63d4cc22d1f0e46979ca5462e4aac54 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -478,6 +478,11 @@ void FFmpegDemuxer::OnFindStreamInfoDone(const PipelineStatusCB& status_cb,
if (start_time_ == kNoTimestamp())
start_time_ = base::TimeDelta();
+ // MPEG-4 B-frames cause grief for a simple container like AVI. Enable PTS
+ // generation so we always get timestamps, see http://crbug.com/169570
+ if (strcmp(format_context->iformat->name, "avi") == 0)
DaleCurtis 2013/02/12 19:23:30 avi_crazy_codec_would_still_match_strcmp_reminder
scherkus (not reviewing) 2013/02/13 17:53:14 gcc disagrees: strcmp("avi", "avi") -> 0 strcmp("a
+ format_context->flags |= AVFMT_FLAG_GENPTS;
+
// Good to go: set the duration and bitrate and notify we're done
// initializing.
host_->SetDuration(max_duration);
« no previous file with comments | « content/browser/media/media_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698