File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
app/src/main/java/protect/videotranscoder Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,9 @@ public void onSuccess()
7676 */
7777 public static void call (final String [] command , @ NonNull final ExecuteBinaryResponseHandler handler )
7878 {
79- if (ffmpeg == null )
79+ if (ffmpeg == null || ffmpeg . isFFmpegCommandRunning () )
8080 {
81- String message = "Command failed, FFmpeg not initialized" ;
81+ String message = "Command failed, FFmpeg " + ( ffmpeg == null ? " not initialized" : "still running" ) ;
8282 Log .d (TAG , message );
8383
8484 handler .onFailure (message );
@@ -182,7 +182,7 @@ public static Long timestampToMs(String timestamp)
182182
183183 public static void getMediaDetails (final File mediaFile , final ResultCallbackHandler <MediaInfo > resultHandler )
184184 {
185- if (ffmpeg == null )
185+ if (ffmpeg == null || ffmpeg . isFFmpegCommandRunning () )
186186 {
187187 resultHandler .onResult (null );
188188 return ;
@@ -437,7 +437,7 @@ static MediaInfo parseMediaInfo(File mediaFile, String string)
437437
438438 public static void getSupportedContainers (final ResultCallbackHandler <List <MediaContainer >> resultHandler )
439439 {
440- if (ffmpeg == null )
440+ if (ffmpeg == null || ffmpeg . isFFmpegCommandRunning () )
441441 {
442442 resultHandler .onResult (null );
443443 return ;
You can’t perform that action at this time.
0 commit comments