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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 395703002: Fold {Audio|Video}Decoder::Stop() into the dtor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: minor fixes Created 6 years, 5 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
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 20416f148077568de3b190e17dd571d1f80ca86f..ba26b61b68c12b9b09de9063303b8f0528411151 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -209,7 +209,8 @@ VpxVideoDecoder::VpxVideoDecoder(
vpx_codec_alpha_(NULL) {}
VpxVideoDecoder::~VpxVideoDecoder() {
- DCHECK_EQ(kUninitialized, state_);
+ DCHECK(task_runner_->BelongsToCurrentThread());
+ state_ = kUninitialized;
scherkus (not reviewing) 2014/07/15 23:37:26 nit: not really needed
xhwang 2014/07/16 03:37:22 Done.
CloseDecoder();
}
@@ -338,12 +339,6 @@ void VpxVideoDecoder::Reset(const base::Closure& closure) {
task_runner_->PostTask(FROM_HERE, closure);
}
-void VpxVideoDecoder::Stop() {
- DCHECK(task_runner_->BelongsToCurrentThread());
-
- state_ = kUninitialized;
-}
-
void VpxVideoDecoder::DecodeBuffer(const scoped_refptr<DecoderBuffer>& buffer) {
DCHECK(task_runner_->BelongsToCurrentThread());
DCHECK_NE(state_, kUninitialized);
« media/filters/video_renderer_impl_unittest.cc ('K') | « media/filters/vpx_video_decoder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698