mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Return an error if transcode fails
This commit is contained in:
parent
ab23fa3af5
commit
fcf14318de
1 changed files with 4 additions and 1 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue