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

Unified Diff: media/filters/vpx_video_decoder.cc

Issue 2964573002: Avoid constexpr compiler bug in VS 2017 (Closed)
Patch Set: Created 3 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vpx_video_decoder.cc
diff --git a/media/filters/vpx_video_decoder.cc b/media/filters/vpx_video_decoder.cc
index 31c039a5e59ec673b7e93aa93ec187febc207b96..854149109b07f18da23f04cd5a28c41ec07e203e 100644
--- a/media/filters/vpx_video_decoder.cc
+++ b/media/filters/vpx_video_decoder.cc
@@ -52,6 +52,8 @@ extern "C" {
namespace media {
+constexpr base::TimeDelta kStaleFrameLimit = base::TimeDelta::FromSeconds(10);
+
// High resolution VP9 decodes can block the main task runner for too long,
// preventing demuxing, audio decoding, and other control activities. In those
// cases share a thread per process for higher resolution decodes.
@@ -396,8 +398,6 @@ void VpxVideoDecoder::MemoryPool::OnVideoFrameDestroyed(
base::EraseIf(
frame_buffers_, [now](const std::unique_ptr<VP9FrameBuffer>& buf) {
- constexpr base::TimeDelta kStaleFrameLimit =
- base::TimeDelta::FromSeconds(10);
return !buf->ref_cnt && now - buf->last_use_time > kStaleFrameLimit;
});
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698