AbstractProgressListener: remove totalSize null check #905
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's in this PR?
This PR removes the null check for
$this->totalSize
present in theAbstractProgressListener
class. This validation isn't necessary for the whole progress-tracking mechanism to work and only helps to estimate a more precise value by adding$this->rate
to the math.Why?
I was testing the progress tracker for my Laravel app and found out that it wasn't working at all. I've read that it was related to the WebM format but it didn't work with X264 either. Later on, I realized that the problem was related to my input instead and the fact that
ffprobe
won't estimate the total size for a sequential input (as in, for a timelapse).i.e.:
ffprobe 'snapshots/XYZC-04offset_7m_0.28mm_205C_PLA_ENDER2PRO_647e82d24817e1.53198987_%d.jpg' -show_format
See how the output for this command does not report a valid size, declaring N/A instead.