diff options
author | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 23:56:04 +0000 |
---|---|---|
committer | wjia@chromium.org <wjia@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-09 23:56:04 +0000 |
commit | d0a9d157afbe3c2783e2d99b316df007d47df675 (patch) | |
tree | b69db5c79ae30d01b793cf1f78f6f4d387fe42a5 /webkit/media/webmediaplayer_ms.cc | |
parent | 88aa5c54eafc95ca153b4bcbe5719e67d72f7237 (diff) | |
download | chromium_src-d0a9d157afbe3c2783e2d99b316df007d47df675.zip chromium_src-d0a9d157afbe3c2783e2d99b316df007d47df675.tar.gz chromium_src-d0a9d157afbe3c2783e2d99b316df007d47df675.tar.bz2 |
set pending_repaint_ flag only when a non-empty frame is sent to Webkit.
When receiving a empty frame pointer, Webkit can call getCurrentFrame multiple times without calling putCurrentFrame.
BUG=142988
Review URL: https://codereview.chromium.org/11090007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@160985 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/media/webmediaplayer_ms.cc')
-rw-r--r-- | webkit/media/webmediaplayer_ms.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/webkit/media/webmediaplayer_ms.cc b/webkit/media/webmediaplayer_ms.cc index 6e09d9d..35d5d1b 100644 --- a/webkit/media/webmediaplayer_ms.cc +++ b/webkit/media/webmediaplayer_ms.cc @@ -320,18 +320,19 @@ unsigned WebMediaPlayerMS::videoDecodedByteCount() const { } WebKit::WebVideoFrame* WebMediaPlayerMS::getCurrentFrame() { - DVLOG(1) << "WebMediaPlayerMS::getCurrentFrame"; + DVLOG(3) << "WebMediaPlayerMS::getCurrentFrame"; DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(!pending_repaint_); - pending_repaint_ = true; - if (current_frame_.get()) + if (current_frame_.get()) { + pending_repaint_ = true; return new webkit_media::WebVideoFrameImpl(current_frame_); + } return NULL; } void WebMediaPlayerMS::putCurrentFrame( WebKit::WebVideoFrame* web_video_frame) { - DVLOG(1) << "WebMediaPlayerMS::putCurrentFrame"; + DVLOG(3) << "WebMediaPlayerMS::putCurrentFrame"; DCHECK(thread_checker_.CalledOnValidThread()); DCHECK(pending_repaint_); pending_repaint_ = false; |