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

Unified Diff: media/mojo/clients/mojo_audio_decoder.h

Issue 2624213006: media: Fix MojoAudioDecoder reinitialization (Closed)
Patch Set: Created 3 years, 11 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/mojo/clients/mojo_audio_decoder.cc » ('j') | media/mojo/clients/mojo_audio_decoder.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_audio_decoder.h
diff --git a/media/mojo/clients/mojo_audio_decoder.h b/media/mojo/clients/mojo_audio_decoder.h
index 0d148f890ec7c37739473385c58eef07b4939d49..d107a0dbda8ff0ff7faab302f757b79c3b078742 100644
--- a/media/mojo/clients/mojo_audio_decoder.h
+++ b/media/mojo/clients/mojo_audio_decoder.h
@@ -45,6 +45,8 @@ class MojoAudioDecoder : public AudioDecoder, public mojom::AudioDecoderClient {
void OnBufferDecoded(mojom::AudioBufferPtr buffer) final;
private:
+ void BindRemoteDecoder();
+
// Callback for connection error on |remote_decoder_|.
void OnConnectionError();
@@ -80,12 +82,14 @@ class MojoAudioDecoder : public AudioDecoder, public mojom::AudioDecoderClient {
DecodeCB decode_cb_;
base::Closure reset_cb_;
+ bool remote_decoder_bound_ = false;
+
// Flag that is set if we got connection error. Never cleared.
- bool has_connection_error_;
+ bool has_connection_error_ = false;
// Flag telling whether this decoder requires bitstream conversion.
// Passed from |remote_decoder_| as a result of its initialization.
- bool needs_bitstream_conversion_;
+ bool needs_bitstream_conversion_ = false;
DISALLOW_COPY_AND_ASSIGN(MojoAudioDecoder);
};
« no previous file with comments | « no previous file | media/mojo/clients/mojo_audio_decoder.cc » ('j') | media/mojo/clients/mojo_audio_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698