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

Unified Diff: media/filters/decoder_stream.h

Issue 1939993002: Ignore calls to Reset() when in error state (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 | media/filters/decoder_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_stream.h
diff --git a/media/filters/decoder_stream.h b/media/filters/decoder_stream.h
index 56d0d27910eb92853954e0817849fc5c00c6eb2b..7e2519ddd1bd7eaec5a64019b694c127b21f5232 100644
--- a/media/filters/decoder_stream.h
+++ b/media/filters/decoder_stream.h
@@ -83,6 +83,8 @@ class MEDIA_EXPORT DecoderStream {
// Note that |closure| is always called asynchronously. This method should
// only be called after initialization has succeeded and must not be called
// during pending Reset().
+ // N.B: If the decoder stream has run into an error, calling this method does
+ // not 'reset' it to a normal state.
void Reset(const base::Closure& closure);
// Returns true if the decoder currently has the ability to decode and return
@@ -140,9 +142,6 @@ class MEDIA_EXPORT DecoderStream {
STATE_REINITIALIZING_DECODER,
STATE_END_OF_STREAM, // End of stream reached; returns EOS on all reads.
STATE_ERROR,
- // TODO(tguilbert): support config changes during decoder fallback, see
- // crbug.com/603713
- STATE_CONFIG_CHANGE_RECEIVED_WHILE_REINITIALIZING_DECODER
};
void SelectDecoder(CdmContext* cdm_context);
@@ -249,6 +248,14 @@ class MEDIA_EXPORT DecoderStream {
// |pending_buffers_|.
std::deque<scoped_refptr<DecoderBuffer>> fallback_buffers_;
+ // TODO(tguilbert): support config changes during decoder fallback, see
+ // crbug.com/603713
+ bool received_config_change_during_reinit_;
+
+ // Used to track read requests in case the STATE_PENDIND_DEMUXER_READ get
+ // overwritten by an error.
+ bool pending_demuxer_read_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<DecoderStream<StreamType>> weak_factory_;
« no previous file with comments | « no previous file | media/filters/decoder_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698