diff --git a/FFmpegAndroid/src/main/java/com/github/hiteshsondhi88/libffmpeg/FFmpegExecuteAsyncTask.java b/FFmpegAndroid/src/main/java/com/github/hiteshsondhi88/libffmpeg/FFmpegExecuteAsyncTask.java index fca2937..4d9a68c 100644 --- a/FFmpegAndroid/src/main/java/com/github/hiteshsondhi88/libffmpeg/FFmpegExecuteAsyncTask.java +++ b/FFmpegAndroid/src/main/java/com/github/hiteshsondhi88/libffmpeg/FFmpegExecuteAsyncTask.java @@ -89,6 +89,10 @@ private void checkAndUpdateProcess() throws TimeoutException, InterruptedExcepti String line; BufferedReader reader = new BufferedReader(new InputStreamReader(process.getErrorStream())); while ((line = reader.readLine()) != null) { + if (isCancelled()) { + return; + } + output += line+"\n"; publishProgress(line); }