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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2349383003: [Merge M54] Look into full URL spec to see whether it is MP4 (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | media/base/mime_util_internal.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_frame_impl.cc
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 626aa7de27b6b3f0d64e42fab4d37b2b6a93f8e1..9593e50974afa604dd63c1647cf77f3fdbc68044 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -802,10 +802,11 @@ bool UseWebMediaPlayerImpl(const GURL& url) {
// Don't use WMPI if the container likely contains a codec we can't decode in
// software and platform decoders are not available.
- if (base::EndsWith(url.path(), ".mp4",
- base::CompareCase::INSENSITIVE_ASCII) &&
- !media::HasPlatformDecoderSupport()) {
- return false;
+ if (!media::HasPlatformDecoderSupport()) {
+ // Assume that "mp4" means H264. Without platform decoder support we cannot
+ // play it with Spitzer, thus fall back to AVDA. http://crbug.com/642988.
+ if (base::ToLowerASCII(url.spec()).find("mp4") != std::string::npos)
+ return false;
}
// Indicates if the Android MediaPlayer should be used instead of WMPI.
« no previous file with comments | « no previous file | media/base/mime_util_internal.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698