Import Cobalt 19.master.0.183272
Change-Id: I3c187298cc9e704eb3d9d16c038b5502b7c7e600
diff --git a/src/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc b/src/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc
index 37f03cd..b62f02d 100644
--- a/src/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc
+++ b/src/starboard/shared/ffmpeg/ffmpeg_audio_decoder_impl.cc
@@ -21,6 +21,7 @@
#include "starboard/log.h"
#include "starboard/memory.h"
#include "starboard/shared/starboard/media/media_util.h"
+#include "starboard/string.h"
namespace starboard {
namespace shared {
@@ -128,7 +129,13 @@
SB_DLOG(WARNING) << "avcodec_decode_audio4() failed with result: " << result
<< " with input buffer size: " << input_buffer->size()
<< " and frame decoded: " << frame_decoded;
+#if SB_HAS(PLAYER_ERROR_MESSAGE)
+ error_cb_(
+ kSbPlayerErrorDecode,
+ FormatString("avcodec_decode_audio4() failed with result %d.", result));
+#else // SB_HAS(PLAYER_ERROR_MESSAGE)
error_cb_();
+#endif // SB_HAS(PLAYER_ERROR_MESSAGE)
return;
}