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

Unified Diff: media/base/demuxer_stream_provider.h

Issue 2558213002: Fix crash in renderer initialization when media pipeline is stopped (Closed)
Patch Set: Added a comment for DemuxerStreamProvider::GetStream Created 4 years 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/renderers/renderer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/demuxer_stream_provider.h
diff --git a/media/base/demuxer_stream_provider.h b/media/base/demuxer_stream_provider.h
index dba6a6ce68a1a0e58b611764f7d42a3ca6c33cd9..353455051e79e154aa615893d15c555878d189e6 100644
--- a/media/base/demuxer_stream_provider.h
+++ b/media/base/demuxer_stream_provider.h
@@ -39,6 +39,13 @@ class MEDIA_EXPORT DemuxerStreamProvider {
// Returns the first stream of the given stream type (which is not allowed
// to be DemuxerStream::TEXT), or NULL if that type of stream is not
// present.
+ // NOTE: Once a DemuxerStream pointer is returned from GetStream it is
+ // guaranteed to stay valid for as long as the Demuxer/DemuxerStreamProvider
+ // is alive. But make no assumption that once GetStream returned a non-null
+ // pointer for some stream type then all subsequent calls will also return
+ // non-null pointer for the same stream type. In MSE Javascript code can
+ // remove SourceBuffer from a MediaSource at any point and this will make
+ // some previously existing streams inaccessible/unavailable.
// Other types:
// Should not be called.
virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0;
« no previous file with comments | « no previous file | media/renderers/renderer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698