summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chromecast/media/cma/backend/media_pipeline_backend_wrapper.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chromecast/media/cma/backend/media_pipeline_backend_wrapper.cc b/chromecast/media/cma/backend/media_pipeline_backend_wrapper.cc
index 447981f..ef86099 100644
--- a/chromecast/media/cma/backend/media_pipeline_backend_wrapper.cc
+++ b/chromecast/media/cma/backend/media_pipeline_backend_wrapper.cc
@@ -28,6 +28,7 @@ MediaPipelineBackendWrapper::~MediaPipelineBackendWrapper() {
MediaPipelineBackend::AudioDecoder*
MediaPipelineBackendWrapper::CreateAudioDecoder() {
+ DCHECK(!is_initialized_);
if (audio_decoder_wrapper_)
return nullptr;
@@ -38,12 +39,14 @@ MediaPipelineBackendWrapper::CreateAudioDecoder() {
MediaPipelineBackend::VideoDecoder*
MediaPipelineBackendWrapper::CreateVideoDecoder() {
+ DCHECK(!is_initialized_);
return backend_->CreateVideoDecoder();
}
bool MediaPipelineBackendWrapper::Initialize() {
+ DCHECK(!is_initialized_);
is_initialized_ = backend_->Initialize();
- if (is_initialized_)
+ if (is_initialized_ && audio_decoder_wrapper_)
audio_decoder_wrapper_->SetStreamTypeVolume(stream_type_volume_);
return is_initialized_;