Refactor progress parsing to handle exceptions gracefully#416
Refactor progress parsing to handle exceptions gracefully#416jeongmallro wants to merge 3 commits into
Conversation
|
Having trouble upgrading to FFMPEG 8.0.1 because somewhere between the old version I'm using and 8.0.1 the progress output has changed. looks to me like the initial progress message generated is causing the progress listener to fall flat, as per the issue mentioned in 333. However, when I run a transcode in the cli that fails via my Java app, the initial progress message output by FFMPEG looks like it would be handled safely by the existing ="N/A" checking that exists on some fields. I wonder whether in fact a NULL is being fed into the parseLine method somewhere instead. at the moment the null checks are just manually throwing null pointer exceptions (completely useless check IMO) and I wonder if replacing the null checks with would be a better approach? that would ensure that even if FFMPEG throws a null out to the progress listener it's not going to kill the whole process |
|
That being said, I consider this PR to be an improvement over the existing parseLine method |
Hello. This PR resolves issue #333.
If parsing fails, it returns -1 for primitive fields and null for object fields (such as Fraction and Status).