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, |