Index: media/filters/video_renderer_algorithm.cc |
diff --git a/media/filters/video_renderer_algorithm.cc b/media/filters/video_renderer_algorithm.cc |
index 6be5db08c6d6e376cf58400c20ef851df0c93c41..695de7ec25d1e7667d72e58aa6f351cb933d84a0 100644 |
--- a/media/filters/video_renderer_algorithm.cc |
+++ b/media/filters/video_renderer_algorithm.cc |
@@ -201,15 +201,16 @@ scoped_refptr<VideoFrame> VideoRendererAlgorithm::Render( |
} |
size_t VideoRendererAlgorithm::RemoveExpiredFrames(base::TimeTicks deadline) { |
+ // Update |last_deadline_max_| if it's no longer accurate; this should always |
+ // be done or EffectiveFramesQueued() may never expire the last frame. |
+ if (deadline > last_deadline_max_) |
+ last_deadline_max_ = deadline; |
+ |
if (!UpdateFrameStatistics() || frame_queue_.size() < 2) |
return 0; |
DCHECK_GT(average_frame_duration_, base::TimeDelta()); |
- // Update |last_deadline_max_| if it's no longer accurate. |
- if (deadline > last_deadline_max_) |
- last_deadline_max_ = deadline; |
- |
// Finds and removes all frames which are too old to be used; I.e., the end of |
// their render interval is further than |max_acceptable_drift_| from the |
// given |deadline|. |