Commit 234ec03
Fix another infinite loop in mix_source_buffer(), case of uneven input
This fixes another potential infinite loop, which may occur if remaining data in the input is less than `bufferframesize`, in such case `framesavail` resulted in 0, and src->offset never advanced.
There are seemingly two options here:
1. Skip the remainder.
2. Use a local temp buffer, copy the remainder over and fill necessary remaining bytes with zeroes, then pass it into mix_buffer() too.
I chose the first, as this ever affects only 1 last sample which, apparently, does not have all of the channels data filled, so this does not seem to be worth it.1 parent 864c4aa commit 234ec03
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1471 | 1471 | | |
1472 | 1472 | | |
1473 | 1473 | | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
1474 | 1479 | | |
1475 | 1480 | | |
1476 | 1481 | | |
| |||
0 commit comments