Stop SoundPool on error instead of continuing
otherwise we might end up looping forever.
Change-Id: I86e33de5387e3acd148d9bba83d18224bb79fd95
diff --git a/media/jni/soundpool/SoundPool.cpp b/media/jni/soundpool/SoundPool.cpp
index a705bcc..090be88 100644
--- a/media/jni/soundpool/SoundPool.cpp
+++ b/media/jni/soundpool/SoundPool.cpp
@@ -589,6 +589,9 @@
ALOGV("format changed to: %s", AMediaFormat_toString(format));
} else if (status == AMEDIACODEC_INFO_TRY_AGAIN_LATER) {
ALOGV("no output buffer right now");
+ } else if (status <= AMEDIA_ERROR_BASE) {
+ ALOGE("decode error: %d", status);
+ break;
} else {
ALOGV("unexpected info code: %d", status);
}