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

Unified Diff: media/filters/ffmpeg_demuxer.cc

Issue 2740863002: Revert of Buffer 2 seconds of data in the ffmpeg demuxer. (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.cc
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
index 7195d1fd04af137daea4b1e35c0e5deb429efff8..d329492be4808fca7491f6b9fbe49c523f48f805 100644
--- a/media/filters/ffmpeg_demuxer.cc
+++ b/media/filters/ffmpeg_demuxer.cc
@@ -779,9 +779,16 @@
}
bool FFmpegDemuxerStream::HasAvailableCapacity() {
- // Try to have two second's worth of encoded data per stream.
- const base::TimeDelta kCapacity = base::TimeDelta::FromSeconds(2);
+ // TODO(scherkus): Remove this return and reenable time-based capacity
+ // after our data sources support canceling/concurrent reads, see
+ // http://crbug.com/165762 for details.
+#if 1
+ return !read_cb_.is_null();
+#else
+ // Try to have one second's worth of encoded data per stream.
+ const base::TimeDelta kCapacity = base::TimeDelta::FromSeconds(1);
return buffer_queue_.IsEmpty() || buffer_queue_.Duration() < kCapacity;
+#endif
}
size_t FFmpegDemuxerStream::MemoryUsage() const {
« no previous file with comments | « no previous file | media/filters/ffmpeg_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698