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

Unified Diff: media/filters/audio_file_reader.h

Issue 2497603003: Roll src/third_party/ffmpeg/ 3c7a09882..cdf4accee (3188 commits). (Closed)
Patch Set: Rebase (liberato@'s pipeline_integration_test_base conflicted; using liberato@'s now here) 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
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_;

Powered by Google App Engine
This is Rietveld 408576698