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

Unified Diff: media/ffmpeg/ffmpeg_common.cc

Issue 1282083003: Add support for H264 and VP9 to AndroidVDA (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move kSupportedH264Profiles into #ifdef Created 5 years, 4 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 | « media/base/video_decoder_config.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/ffmpeg/ffmpeg_common.cc
diff --git a/media/ffmpeg/ffmpeg_common.cc b/media/ffmpeg/ffmpeg_common.cc
index 5b6ef7fe3c19c3df7b31ffb194240198bc3e6f81..9948cbe3b35c660efd909a703b2f9844e1520df9 100644
--- a/media/ffmpeg/ffmpeg_common.cc
+++ b/media/ffmpeg/ffmpeg_common.cc
@@ -394,6 +394,15 @@ void AVStreamToVideoDecoderConfig(
else
profile = ProfileIDToVideoCodecProfile(stream->codec->profile);
+ // Without the FFmpeg h264 decoder, AVFormat is unable to get the profile, so
+ // default to baseline and let the VDA fail later if it doesn't support the
+ // real profile. This is alright because if the FFmpeg h264 decoder isn't
+ // enabled, there is no fallback if the VDA fails.
+#if defined(DISABLE_FFMPEG_VIDEO_DECODERS)
+ if (codec == kCodecH264)
+ profile = H264PROFILE_BASELINE;
+#endif
+
gfx::Size natural_size = GetNaturalSize(
visible_rect.size(), aspect_ratio.num, aspect_ratio.den);
« no previous file with comments | « media/base/video_decoder_config.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698