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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 2093007: Chromium side changes for enabling VP8 and WebM support. (Closed)
Patch Set: Final fixes Created 10 years, 7 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 | « DEPS ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | 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 154e565914609de4eacaf5247aea2564dcf58b1c..5268c59c2614973ebdd6d0ecf1a0ef78e0b74c2b 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -404,11 +404,19 @@ void FFmpegDemuxer::InitializeTask(DataSource* data_source,
// Create demuxer streams for all supported streams.
base::TimeDelta max_duration;
+ const bool kDemuxerIsWebm = !strcmp("webm", format_context_->iformat->name);
for (size_t i = 0; i < format_context_->nb_streams; ++i) {
AVCodecContext* codec_context = format_context_->streams[i]->codec;
CodecType codec_type = codec_context->codec_type;
if (codec_type == CODEC_TYPE_AUDIO || codec_type == CODEC_TYPE_VIDEO) {
AVStream* stream = format_context_->streams[i];
+ // WebM is currently strictly VP8 and Vorbis.
+ if (kDemuxerIsWebm && (stream->codec->codec_id != CODEC_ID_VP8 &&
+ stream->codec->codec_id != CODEC_ID_VORBIS)) {
+ packet_streams_.push_back(NULL);
+ continue;
+ }
+
FFmpegDemuxerStream* demuxer_stream
= new FFmpegDemuxerStream(this, stream);
« no previous file with comments | « DEPS ('k') | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698