Index: media/filters/ffmpeg_demuxer.cc |
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc |
index c06dd295de9dfe8b111c01aad19ce5a83c13f54b..7b843963f276b9c4877d823dc6a537f465696153 100644 |
--- a/media/filters/ffmpeg_demuxer.cc |
+++ b/media/filters/ffmpeg_demuxer.cc |
@@ -917,6 +917,15 @@ void FFmpegDemuxer::AddTextStreams() { |
} |
} |
+int64_t FFmpegDemuxer::GetMemoryUsage() const { |
+ int64_t allocation_size = 0; |
+ for (const auto& stream : streams_) { |
+ if (stream) |
+ allocation_size += stream->MemoryUsage(); |
+ } |
+ return allocation_size; |
+} |
+ |
// Helper for calculating the bitrate of the media based on information stored |
// in |format_context| or failing that the size and duration of the media. |
// |