From fb621e8737392ef10acbba083b46aedf6583c9a4 Mon Sep 17 00:00:00 2001 From: Ronghua Wu Date: Tue, 28 Apr 2015 10:57:57 -0700 Subject: media: set codec exception reason. Bug: 19620911 Change-Id: I13c007bc82b367680e9a15dc6caed6ef8a81d0a6 --- media/jni/android_media_MediaCodec.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'media') diff --git a/media/jni/android_media_MediaCodec.cpp b/media/jni/android_media_MediaCodec.cpp index 5f586a9..e34f9ed 100644 --- a/media/jni/android_media_MediaCodec.cpp +++ b/media/jni/android_media_MediaCodec.cpp @@ -592,8 +592,8 @@ static jthrowable createCodecException( break; } - // TODO: propagate reason from MediaCodec. - int reason = gExceptionReason.reasonHardware; + int reason = + (err == DEAD_OBJECT) ? gExceptionReason.reasonReclaimed : gExceptionReason.reasonHardware; return (jthrowable)env->NewObject(clazz.get(), ctor, err, actionCode, msgObj.get(), reason); } -- cgit v1.1