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

Unified Diff: media/filters/ffmpeg_audio_decoder.cc

Issue 10067035: RefCounted types should not have public destructors, media/ and gpu/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 8 years, 7 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/ffmpeg_audio_decoder.h ('k') | media/filters/ffmpeg_demuxer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_audio_decoder.cc
diff --git a/media/filters/ffmpeg_audio_decoder.cc b/media/filters/ffmpeg_audio_decoder.cc
index c5a70017d51da0979c82d1d36686c52b9b795462..dc660e5a391f8a0da16dea33287f9455b11ec2c4 100644
--- a/media/filters/ffmpeg_audio_decoder.cc
+++ b/media/filters/ffmpeg_audio_decoder.cc
@@ -57,18 +57,6 @@ FFmpegAudioDecoder::FFmpegAudioDecoder(
decoded_audio_(static_cast<uint8*>(av_malloc(decoded_audio_size_))) {
}
-FFmpegAudioDecoder::~FFmpegAudioDecoder() {
- av_free(decoded_audio_);
-
- // TODO(scherkus): should we require Stop() to be called? this might end up
- // getting called on a random thread due to refcounting.
- if (codec_context_) {
- av_free(codec_context_->extradata);
- avcodec_close(codec_context_);
- av_free(codec_context_);
- }
-}
-
void FFmpegAudioDecoder::Initialize(
const scoped_refptr<DemuxerStream>& stream,
const PipelineStatusCB& status_cb,
@@ -111,6 +99,18 @@ void FFmpegAudioDecoder::Reset(const base::Closure& closure) {
&FFmpegAudioDecoder::DoReset, this, closure));
}
+FFmpegAudioDecoder::~FFmpegAudioDecoder() {
+ av_free(decoded_audio_);
+
+ // TODO(scherkus): should we require Stop() to be called? this might end up
+ // getting called on a random thread due to refcounting.
+ if (codec_context_) {
+ av_free(codec_context_->extradata);
+ avcodec_close(codec_context_);
+ av_free(codec_context_);
+ }
+}
+
void FFmpegAudioDecoder::DoInitialize(
const scoped_refptr<DemuxerStream>& stream,
const PipelineStatusCB& status_cb,
« no previous file with comments | « media/filters/ffmpeg_audio_decoder.h ('k') | media/filters/ffmpeg_demuxer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698