From fcf14318de533335d08fc0496d8872a37a340018 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Sun, 11 Nov 2012 18:07:48 +0530 Subject: [PATCH] Return an error if transcode fails --- jni/transcode.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jni/transcode.c b/jni/transcode.c index 00090fa03..5eb390a14 100644 --- a/jni/transcode.c +++ b/jni/transcode.c @@ -22,6 +22,7 @@ static int transcode(const char *infile, const char *outfile, GstBus *bus; GstMessage *msg; gchar pipeline_str[1024]; + int ret = 0; init(); @@ -89,6 +90,8 @@ static int transcode(const char *infile, const char *outfile, g_error_free(err); g_free(debug_info); + + ret = -1; goto done; } @@ -108,7 +111,7 @@ done: gst_element_set_state (pipeline, GST_STATE_NULL); gst_object_unref (pipeline); - return 0; + return ret; } jint Java_org_wikimedia_commons_Transcoder_transcode(JNIEnv* env,