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

Unified Diff: content/renderer/render_frame_impl.cc

Issue 2338213005: Look into full URL spec to see whether it is MP4 (Closed)
Patch Set: Added reference to the bug in the comments. 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 4c5d7a3e37e4de3e3fa88be809293cc7e867c2ec..05714299dc2131edf5cace41d0d379ce22cbafa5 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -796,10 +796,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