From c84878ad4b967464698e0196e4d6ee326eb6cca7 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Mon, 7 Jan 2013 18:20:47 -0500 Subject: [PATCH] androidmedia: Fix get_level and get_profile exception checking by not using return --- sys/androidmedia/gst-android-media-mediacodecinfo.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/androidmedia/gst-android-media-mediacodecinfo.c b/sys/androidmedia/gst-android-media-mediacodecinfo.c index 997c90ab7e..abaec7326a 100644 --- a/sys/androidmedia/gst-android-media-mediacodecinfo.c +++ b/sys/androidmedia/gst-android-media-mediacodecinfo.c @@ -498,14 +498,20 @@ gint gst_am_mediacodecprofilelevel_get_level (GstAmMediaCodecProfileLevel * self) { JNIEnv *env = gst_dvm_get_env (); + gint ret; - return AMMCPL_FIELD (return -1, Int, level); + ret = AMMCPL_FIELD (return -1, Int, level); + + return ret; } gint gst_am_mediacodecprofilelevel_get_profile (GstAmMediaCodecProfileLevel * self) { JNIEnv *env = gst_dvm_get_env (); + gint ret; - return AMMCPL_FIELD (return -1, Int, profile); + ret = AMMCPL_FIELD (return -1, Int, profile); + + return ret; }