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

Unified Diff: media/base/android/media_codec_audio_decoder.cc

Issue 1242913004: MediaCodecPlayer implementation (stage 3 - browser seek and surface change) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mtplayer-seek
Patch Set: Rebased, changed DCHECKs. Created 5 years, 5 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/base/android/media_codec_decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/media_codec_audio_decoder.cc
diff --git a/media/base/android/media_codec_audio_decoder.cc b/media/base/android/media_codec_audio_decoder.cc
index 6bef03de32214781c2e75801b8920fac6afcb198..c910ce62f272ef889354ea257d6adc9462b935f3 100644
--- a/media/base/android/media_codec_audio_decoder.cc
+++ b/media/base/android/media_codec_audio_decoder.cc
@@ -107,9 +107,15 @@ MediaCodecDecoder::ConfigStatus MediaCodecAudioDecoder::ConfigureInternal() {
DVLOG(1) << class_name() << "::" << __FUNCTION__;
+ if (configs_.audio_codec == kUnknownAudioCodec) {
+ DVLOG(0) << class_name() << "::" << __FUNCTION__
+ << " configuration parameters are required";
+ return kConfigFailure;
+ }
+
media_codec_bridge_.reset(AudioCodecBridge::Create(configs_.audio_codec));
if (!media_codec_bridge_)
- return CONFIG_FAILURE;
+ return kConfigFailure;
if (!(static_cast<AudioCodecBridge*>(media_codec_bridge_.get()))
->Start(
@@ -125,7 +131,7 @@ MediaCodecDecoder::ConfigStatus MediaCodecAudioDecoder::ConfigureInternal() {
DVLOG(1) << class_name() << "::" << __FUNCTION__ << " failed";
media_codec_bridge_.reset();
- return CONFIG_FAILURE;
+ return kConfigFailure;
}
DVLOG(1) << class_name() << "::" << __FUNCTION__ << " succeeded";
@@ -136,7 +142,7 @@ MediaCodecDecoder::ConfigStatus MediaCodecAudioDecoder::ConfigureInternal() {
frame_count_ = 0;
ResetTimestampHelper();
- return CONFIG_OK;
+ return kConfigOk;
}
void MediaCodecAudioDecoder::OnOutputFormatChanged() {
« no previous file with comments | « no previous file | media/base/android/media_codec_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698