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

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

Issue 1992913002: [merged] Report media error if PlayOutputBuffer failed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2704
Patch Set: Created 4 years, 7 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 | « media/base/android/media_decoder_job.cc ('k') | media/base/android/video_decoder_job.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/android/sdk_media_codec_bridge.cc
diff --git a/media/base/android/sdk_media_codec_bridge.cc b/media/base/android/sdk_media_codec_bridge.cc
index e35fd4b7a8d7474924f6d4b5f691ee6bc761c5ee..01094d1a31792df50e7c1f944f45f7e13eac01ab 100644
--- a/media/base/android/sdk_media_codec_bridge.cc
+++ b/media/base/android/sdk_media_codec_bridge.cc
@@ -578,8 +578,11 @@ MediaCodecStatus AudioCodecBridge::PlayOutputBuffer(int index,
size_t capacity = 0;
MediaCodecStatus status =
GetOutputBufferAddress(index, offset, &buffer, &capacity);
- if (status == MEDIA_CODEC_ERROR)
+ if (status != MEDIA_CODEC_OK) {
+ DLOG(ERROR) << __FUNCTION__
+ << ": GetOutputBufferAddress() failed for index:" << index;
return status;
+ }
numBytes = std::min(base::checked_cast<int>(capacity), numBytes);
CHECK_GE(numBytes, 0);
« no previous file with comments | « media/base/android/media_decoder_job.cc ('k') | media/base/android/video_decoder_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698