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

Unified Diff: chromecast/media/cma/filters/demuxer_stream_adapter.cc

Issue 1140003002: Chromecast: fix handling of streams with different durations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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: chromecast/media/cma/filters/demuxer_stream_adapter.cc
diff --git a/chromecast/media/cma/filters/demuxer_stream_adapter.cc b/chromecast/media/cma/filters/demuxer_stream_adapter.cc
index 191ed636828216497d67ebb52fb5bdabb3ca3bbe..c2fd5a4786188961477fa2ec1a012b8f8714b056 100644
--- a/chromecast/media/cma/filters/demuxer_stream_adapter.cc
+++ b/chromecast/media/cma/filters/demuxer_stream_adapter.cc
@@ -183,6 +183,13 @@ void DemuxerStreamAdapter::OnNewBuffer(
DCHECK_EQ(status, ::media::DemuxerStream::kOk);
+ if (input->end_of_stream()) {
+ // This stream has ended, its media time will stop increasing, but there
+ // might be other streams that are still playing. Remove the task runner of
+ // this stream to ensure other streams are not blocked waiting for this one.
+ ResetMediaTaskRunner();
damienv1 2015/05/13 01:37:43 1) I don't think this fully address the issue: e.g
+ }
+
// Updates the timestamp used for task scheduling.
if (!input->end_of_stream() &&
input->timestamp() != ::media::kNoTimestamp() &&
« 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