| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Validate the frame rate after rounding to an integer, not before. This prevents values like 0.5 from passing validation (0.5 > 0) but then rounding to 0, which would cause a confusing delayed error "sampling rate not specified" when writing frames. With this fix, setframerate(0.5) immediately raises "bad frame rate", providing clear feedback at the point of the error.
There was a problem hiding this comment.
Thank you!
I pushed a commit directly: We have a little helper to "parametrize" tests, so that the first failure doesn't mask the rest.
Do the tests look good to you?
Sorry, something went wrong.
Elegant, thanks!!! |
Sorry, something went wrong.
…ythonGH-144976) Validate the frame rate after rounding to an integer, not before. This prevents values like 0.5 from passing validation (0.5 > 0) but then rounding to 0, which would cause a confusing delayed error "sampling rate not specified" when writing frames. With this fix, setframerate(0.5) immediately raises "bad frame rate", providing clear feedback at the point of the error.
| Back | FazBrowse Home | New Git URL |
Validate the frame rate after rounding to an integer, not before. This prevents values like 0.5 from passing validation (0.5 > 0) but then rounding to 0, which would cause a confusing delayed error "sampling rate not specified" when writing frames.
With this fix, setframerate(0.5) immediately raises "bad frame rate", providing clear feedback at the point of the error.
See #144975