-
-
Notifications
You must be signed in to change notification settings - Fork 820
getLastCommandOutput() returns incomplete result after execution #211
Comments
I never experienced this behavior but technically it can happen. Unfortunately, there is not an easy solution for this.
In your case, when
Can you give me more details about the command you use? I tried to reproduce this issue locally but I wasn't successful. |
Actually, I am not doing too much work inside LogCallback. I am just notifying listener to cancel the notification. So we can eliminate the second reason. So when we back to the first reason you gave, It might be the reason. We are using FFmpeg in our Video Editor project which is not a simple video editor. So user can combine, crop, filter, resize videos and audios, also command script has lots of input including, gifs, overlay images, audios, etc. But, besides all, I think, execute() operation has to wait for all other logging threads or drop invalid logs and emit last possible and complete log when it is completed. By the way, I don't know if it is possible on your library side. I believe you can reproduce this issue locally by using my command script, but as I said before, I have lots of params. So It is really hard to attach all files with my script here. But here is the script in case you can find some clue about the situation. (Reformatted for readability)
I did a little hack. (Thread.sleep(400) after execute() command has finished) It is working for now. But it is a workaround. I am really appreciated If you find out a fix for the problem. |
Thanks. First versions of the library didn't have a queue and a callback thread. So technically, I don't want to change the current design but I agree that However, improving |
Fixed in the development branch. |
Description
FFmpeg.getLastCommandOutput()
returns incomplete result after execution. ButConfig.enableLogCallback{ }
still emitting values and complete values after execution is completed.Expected behavior
I think
FFmpeg.getLastCommandOutput()
should return complete result if it is called afterFFmpeg.execute()
operation is complete. And alsoConfig.enableLogCallback{ }
should stop emitting value afterFFmpeg.execute()
operation returns a value.Code Sample
Output:
Environment
The text was updated successfully, but these errors were encountered: