Skip to content

Commit 9f4e487

Browse files
Merge pull request cropsly#10 from gmxu/pull_requests
Check and cancel FFmpegExecuteAsyncTask if cancelled
2 parents ca14d9f + d530369 commit 9f4e487

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

FFmpegAndroid/src/main/java/com/github/hiteshsondhi88/libffmpeg/FFmpegExecuteAsyncTask.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ private void checkAndUpdateProcess() throws TimeoutException, InterruptedExcepti
8989
String line;
9090
BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream()));
9191
while ((line = reader.readLine()) != null) {
92+
if (isCancelled()) {
93+
return;
94+
}
95+
9296
output += line+"\n";
9397
publishProgress(line);
9498
}

0 commit comments

Comments
 (0)