| Index: media/filters/media_source_state.h
|
| diff --git a/media/filters/media_source_state.h b/media/filters/media_source_state.h
|
| index e6878f6071ce9efe5ac11232970f01395d60a43a..89974a6b506e2971566d840439232bafc411b1e7 100644
|
| --- a/media/filters/media_source_state.h
|
| +++ b/media/filters/media_source_state.h
|
| @@ -116,6 +116,16 @@ class MEDIA_EXPORT MediaSourceState {
|
| void SetTracksWatcher(const Demuxer::MediaTracksUpdatedCB& tracks_updated_cb);
|
|
|
| private:
|
| + // State advances through this list. The intent is to ensure at least one
|
| + // config is received prior to parser calling initialization callback, and
|
| + // that such initialization callback occurs at most once per parser.
|
| + enum State {
|
| + UNINITIALIZED = 0,
|
| + PENDING_PARSER_CONFIG,
|
| + PENDING_PARSER_INIT,
|
| + PARSER_INITIALIZED
|
| + };
|
| +
|
| // Called by the |stream_parser_| when a new initialization segment is
|
| // encountered.
|
| // Returns true on a successful call. Returns false if an error occurred while
|
| @@ -192,6 +202,8 @@ class MEDIA_EXPORT MediaSourceState {
|
| scoped_refptr<MediaLog> media_log_;
|
| StreamParser::InitCB init_cb_;
|
|
|
| + State state_;
|
| +
|
| // During Append(), OnNewConfigs() will trigger the initialization segment
|
| // received algorithm. Note, the MSE spec explicitly disallows this algorithm
|
| // during an Abort(), since Abort() is allowed only to emit coded frames, and
|
|
|