Skip to content

Commit 7e82894

Browse files
authored
Merge branch 'masterQ' into pull_request_Q
2 parents b5d70e7 + 777c9b4 commit 7e82894

File tree

6 files changed

+11
-7
lines changed

6 files changed

+11
-7
lines changed

android-ffmpeg/src/main/java/nl/bravobit/ffmpeg/FFcommandExecuteAsyncTask.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class FFcommandExecuteAsyncTask extends AsyncTask<Void, String, CommandResult> i
1818
private final long timeout;
1919
private long startTime;
2020
private Process process;
21+
private StringBuilder outputStringBuilder = new StringBuilder();
2122
private String output = "";
2223
private boolean quitPending;
2324

@@ -39,23 +40,27 @@ protected void onPreExecute() {
3940

4041
@Override
4142
protected CommandResult doInBackground(Void... params) {
43+
CommandResult ret = CommandResult.getDummyFailureResponse();
4244
try {
4345
process = shellCommand.run(cmd, environment);
4446
if (process == null) {
4547
return CommandResult.getDummyFailureResponse();
4648
}
4749
Log.d("Running publishing updates method");
4850
checkAndUpdateProcess();
49-
return CommandResult.getOutputFromProcess(process);
51+
ret = CommandResult.getOutputFromProcess(process);
52+
outputStringBuilder.append(ret.output);
5053
} catch (TimeoutException e) {
5154
Log.e("FFmpeg binary timed out", e);
52-
return new CommandResult(false, e.getMessage());
55+
ret = new CommandResult(false, e.getMessage());
56+
outputStringBuilder.append(ret.output);
5357
} catch (Exception e) {
5458
Log.e("Error running FFmpeg binary", e);
5559
} finally {
5660
Util.destroyProcess(process);
5761
}
58-
return CommandResult.getDummyFailureResponse();
62+
output = outputStringBuilder.toString();
63+
return ret;
5964
}
6065

6166
@Override
@@ -68,7 +73,6 @@ protected void onProgressUpdate(String... values) {
6873
@Override
6974
protected void onPostExecute(CommandResult commandResult) {
7075
if (ffmpegExecuteResponseHandler != null) {
71-
output += commandResult.output;
7276
if (commandResult.success) {
7377
ffmpegExecuteResponseHandler.onSuccess(output);
7478
} else {
@@ -107,7 +111,7 @@ private void checkAndUpdateProcess() throws TimeoutException, InterruptedExcepti
107111
return;
108112
}
109113

110-
output += line + "\n";
114+
outputStringBuilder.append(line); outputStringBuilder.append("\n");
111115
publishProgress(line);
112116
}
113117
} catch (IOException e) {

android-ffmpeg/src/main/java/nl/bravobit/ffmpeg/FileUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import java.io.File;
66

77
class FileUtils {
8-
private static final String FFMPEG_FILE_NAME = "ffmpeg";
9-
private static final String FFPROBE_FILE_NAME = "ffprobe";
8+
private static final String FFMPEG_FILE_NAME = "lib..ffmpeg..so";
9+
private static final String FFPROBE_FILE_NAME = "lib..ffprobe.so";
1010

1111
static File getFFmpeg(Context context) {
1212
File folder = new File(context.getApplicationInfo().nativeLibraryDir);
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)