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

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

Issue 227523005: Fix the flaky MediaSourcePlayerTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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/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 b7eef0cdfbfbdb0769aaab6b621fda43f2948108..8a7b13ad4795a7c7ab1906ad10127568d5fdd71f 100644
--- a/media/base/android/media_decoder_job.cc
+++ b/media/base/android/media_decoder_job.cc
@@ -72,13 +72,18 @@ void MediaDecoderJob::OnDataReceived(const DemuxerData& data) {
is_requesting_demuxer_data_ = false;
base::Closure done_cb = base::ResetAndReturn(&on_data_received_cb_);
+
+ // If this data request is for the inactive chunk, do nothing.
wolenetz 2014/04/10 00:15:35 I'm confused. If it's a request for the inactive c
qinmin 2014/04/10 00:19:37 So if done_cb.is_null() is true, this is the data
+ if (done_cb.is_null())
+ return;
+
if (stop_decode_pending_) {
+ DCHECK(is_decoding());
OnDecodeCompleted(MEDIA_CODEC_STOPPED, kNoTimestamp(), 0);
return;
}
- if (!done_cb.is_null())
- done_cb.Run();
+ done_cb.Run();
}
void MediaDecoderJob::Prefetch(const base::Closure& prefetch_cb) {
« 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