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 1963343002: Report media error if PlayOutputBuffer failed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed Min's comment 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 7780f9daeed884aca08848d5be10c973940e890e..840f57724c06560fdfbe78e21d7b7eaa038ecf04 100644
--- a/media/base/android/sdk_media_codec_bridge.cc
+++ b/media/base/android/sdk_media_codec_bridge.cc
@@ -579,8 +579,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