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

Unified Diff: media/filters/audio_file_reader.h

Issue 2534193003: To M56: Roll src/third_party/ffmpeg/ 3c7a09882..cdf4accee (3188 commits). (Closed)
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | media/filters/audio_file_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/audio_file_reader.h
diff --git a/media/filters/audio_file_reader.h b/media/filters/audio_file_reader.h
index c12ee0aa67adff24eba49c88394122060521e8e4..1e42abd7b018fde25b2d6fce976fa26807de0b63 100644
--- a/media/filters/audio_file_reader.h
+++ b/media/filters/audio_file_reader.h
@@ -10,6 +10,7 @@
#include "base/macros.h"
#include "media/base/audio_codecs.h"
#include "media/base/media_export.h"
+#include "media/ffmpeg/ffmpeg_deleters.h"
#include "media/filters/ffmpeg_glue.h"
struct AVCodecContext;
@@ -75,7 +76,7 @@ class MEDIA_EXPORT AudioFileReader {
const AVStream* GetAVStreamForTesting() const;
const AVCodecContext* codec_context_for_testing() const {
- return codec_context_;
+ return codec_context_.get();
}
private:
@@ -83,8 +84,10 @@ class MEDIA_EXPORT AudioFileReader {
bool OpenDecoder();
bool ReadPacket(AVPacket* output_packet);
+ // Destruct |glue_| after |codec_context_|.
std::unique_ptr<FFmpegGlue> glue_;
- AVCodecContext* codec_context_;
+ std::unique_ptr<AVCodecContext, ScopedPtrAVFreeContext> codec_context_;
+
int stream_index_;
FFmpegURLProtocol* protocol_;
AudioCodec audio_codec_;
« no previous file with comments | « media/ffmpeg/ffmpeg_regression_tests.cc ('k') | media/filters/audio_file_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698