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

Unified Diff: content/renderer/media/android/webmediaplayer_android.cc

Issue 56443002: Fix an issue that mediaplayer can return size(0,0) for a valid video (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use MATCH_PARENT Created 7 years, 1 month 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/public/android/java/src/org/chromium/content/browser/ContentVideoView.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/android/webmediaplayer_android.cc
diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc
index 01bfa7181b80807ddbf07126e9de310ae5f01c61..9e83eb550e02d65007fc131948cee6a4a052ae2f 100644
--- a/content/renderer/media/android/webmediaplayer_android.cc
+++ b/content/renderer/media/android/webmediaplayer_android.cc
@@ -420,8 +420,8 @@ void WebMediaPlayerAndroid::setVolume(double volume) {
bool WebMediaPlayerAndroid::hasVideo() const {
// If we have obtained video size information before, use it.
- if (has_size_info_)
- return !natural_size_.isEmpty();
+ if (has_size_info_ && !natural_size_.isEmpty())
+ return true;
// TODO(qinmin): need a better method to determine whether the current media
// content contains video. Android does not provide any function to do
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/ContentVideoView.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698