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

Unified Diff: media/base/android/media_decoder_job.cc

Issue 113963005: Use decoder's timestamp instead of the timestamp from AU during prerolling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: adding crbug Created 6 years, 12 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/base/android/media_source_player_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_decoder_job.cc
diff --git a/media/base/android/media_decoder_job.cc b/media/base/android/media_decoder_job.cc
index 75b72ce5fc224b4b4db3a9a60323a5a9d18f04e2..08b56aa145c5fc46b2afd2f4ffcd3a3e9c4d1c6a 100644
--- a/media/base/android/media_decoder_job.cc
+++ b/media/base/android/media_decoder_job.cc
@@ -350,14 +350,7 @@ void MediaDecoderJob::DecodeInternal(
else if (input_status == MEDIA_CODEC_INPUT_END_OF_STREAM)
status = MEDIA_CODEC_INPUT_END_OF_STREAM;
- // Check whether we need to render the output.
- // TODO(qinmin): comparing most recently queued input's |unit.timestamp| with
- // |preroll_timestamp_| is not accurate due to data reordering and possible
- // input queueing without immediate dequeue when |input_status| !=
- // |MEDIA_CODEC_OK|. Need to use the |presentation_timestamp| for video, and
- // use |size| to calculate the timestamp for audio. See
- // http://crbug.com/310823 and http://b/11356652.
- bool render_output = unit.timestamp >= preroll_timestamp_ &&
+ bool render_output = presentation_timestamp >= preroll_timestamp_ &&
(status != MEDIA_CODEC_OUTPUT_END_OF_STREAM || size != 0u);
base::TimeDelta time_to_render;
DCHECK(!start_time_ticks.is_null());
« no previous file with comments | « no previous file | media/base/android/media_source_player_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698