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

Side by Side Diff: media/filters/video_renderer_base.cc

Issue 8561019: Clear VideoRendererBase::current_frame_ when stopped. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | media/filters/video_renderer_base_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/bind.h" 5 #include "base/bind.h"
6 #include "base/callback.h" 6 #include "base/callback.h"
7 #include "base/threading/platform_thread.h" 7 #include "base/threading/platform_thread.h"
8 #include "media/base/buffers.h" 8 #include "media/base/buffers.h"
9 #include "media/base/filter_host.h" 9 #include "media/base/filter_host.h"
10 #include "media/base/limits.h" 10 #include "media/base/limits.h"
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // Scale our sleep based on the playback rate. 470 // Scale our sleep based on the playback rate.
471 // TODO(scherkus): floating point badness and degrade gracefully. 471 // TODO(scherkus): floating point badness and degrade gracefully.
472 return base::TimeDelta::FromMicroseconds( 472 return base::TimeDelta::FromMicroseconds(
473 static_cast<int64>(sleep.InMicroseconds() / playback_rate)); 473 static_cast<int64>(sleep.InMicroseconds() / playback_rate));
474 } 474 }
475 475
476 void VideoRendererBase::DoStopOrError_Locked() { 476 void VideoRendererBase::DoStopOrError_Locked() {
477 DCHECK(!pending_paint_); 477 DCHECK(!pending_paint_);
478 DCHECK(!pending_paint_with_last_available_); 478 DCHECK(!pending_paint_with_last_available_);
479 lock_.AssertAcquired(); 479 lock_.AssertAcquired();
480 current_frame_ = NULL;
480 last_available_frame_ = NULL; 481 last_available_frame_ = NULL;
481 DCHECK(!pending_read_); 482 DCHECK(!pending_read_);
482 } 483 }
483 484
484 } // namespace media 485 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/video_renderer_base_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698