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

Unified Diff: media/filters/opus_audio_decoder.cc

Issue 193303002: WeakPtr destruction order cleanup: media edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 years, 9 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 | « media/filters/opus_audio_decoder.h ('k') | media/filters/video_renderer_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/opus_audio_decoder.cc
diff --git a/media/filters/opus_audio_decoder.cc b/media/filters/opus_audio_decoder.cc
index d63f4b249e5c6de4b3e91be16f8a7a57d5c1a8bc..d696c04cadf8481301512b62e1ae6a4fbbb24cb9 100644
--- a/media/filters/opus_audio_decoder.cc
+++ b/media/filters/opus_audio_decoder.cc
@@ -6,9 +6,6 @@
#include <cmath>
-#include "base/bind.h"
-#include "base/callback_helpers.h"
-#include "base/location.h"
#include "base/single_thread_task_runner.h"
#include "base/sys_byteorder.h"
#include "media/base/audio_buffer.h"
@@ -17,8 +14,6 @@
#include "media/base/bind_to_current_loop.h"
#include "media/base/buffers.h"
#include "media/base/decoder_buffer.h"
-#include "media/base/demuxer.h"
-#include "media/base/pipeline.h"
#include "third_party/opus/src/include/opus.h"
#include "third_party/opus/src/include/opus_multistream.h"
@@ -255,7 +250,6 @@ static bool ParseOpusExtraData(const uint8* data, int data_size,
OpusAudioDecoder::OpusAudioDecoder(
const scoped_refptr<base::SingleThreadTaskRunner>& task_runner)
: task_runner_(task_runner),
- weak_factory_(this),
opus_decoder_(NULL),
channel_layout_(CHANNEL_LAYOUT_NONE),
samples_per_second_(0),
@@ -264,15 +258,13 @@ OpusAudioDecoder::OpusAudioDecoder(
last_input_timestamp_(kNoTimestamp()),
frames_to_discard_(0),
frame_delay_at_start_(0),
- start_input_timestamp_(kNoTimestamp()) {
-}
+ start_input_timestamp_(kNoTimestamp()) {}
void OpusAudioDecoder::Initialize(const AudioDecoderConfig& config,
const PipelineStatusCB& status_cb) {
DCHECK(task_runner_->BelongsToCurrentThread());
PipelineStatusCB initialize_cb = BindToCurrentLoop(status_cb);
- weak_this_ = weak_factory_.GetWeakPtr();
config_ = config;
if (!ConfigureDecoder()) {
« no previous file with comments | « media/filters/opus_audio_decoder.h ('k') | media/filters/video_renderer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698