Commit e8d07ea
authored
Fix audio buffering crash (#927)
### Linked issues
[#610](#610)
### Summarize your change.
This update adds a check to audioCacheProgressGlyph() to confirm that
the total frames is not less than or equal to 0.
### Describe the reason for the change.
If audio buffering ends prematurely (ex: the EDL data is changed while a
source's audio is being actively cached), this can cause
audioCacheProgressGlyph to calculate the total frames as less than or
equal to 0, which would cause the code to either divide by zero or draw
a negative percentage glyph, which causes OpenRV to freeze. I added a
check that the total frames are greater than 0.
### Describe what you have tested and on which operating system.
Successfully tested on Rocky Linux 9.5.
### Add a list of changes, and note any that might need special
attention during the review.
### If possible, provide screenshots.
Signed-off-by: TJ Jackson <[email protected]>1 parent 94973e0 commit e8d07ea
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5575 | 5575 | | |
5576 | 5576 | | |
5577 | 5577 | | |
5578 | | - | |
5579 | | - | |
| 5578 | + | |
| 5579 | + | |
| 5580 | + | |
| 5581 | + | |
| 5582 | + | |
5580 | 5583 | | |
5581 | 5584 | | |
5582 | 5585 | | |
| |||
0 commit comments