mirror of
https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs.git
synced 2024-11-22 11:30:59 +00:00
rtp: tests: Simplify loop
All buffers can be added in 100 outer loops. Add buffer less than 200 in the last (i = 99) loop. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/merge_requests/1489>
This commit is contained in:
parent
15e7a63e7b
commit
7a46377627
1 changed files with 3 additions and 5 deletions
|
@ -74,12 +74,10 @@ fn test_pcma_splitting() {
|
||||||
let mut expected_pay = Vec::with_capacity(134);
|
let mut expected_pay = Vec::with_capacity(134);
|
||||||
let mut queued = 0;
|
let mut queued = 0;
|
||||||
let mut pos = 0;
|
let mut pos = 0;
|
||||||
for i in 0..134 {
|
for i in 0..100 {
|
||||||
if i < 100 {
|
queued += 480;
|
||||||
queued += 480;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (i < 100 && queued >= 200) || (i == 100 && queued > 0) {
|
while queued >= 200 || (i == 99 && queued > 0) {
|
||||||
let size = cmp::min(queued, 400);
|
let size = cmp::min(queued, 400);
|
||||||
queued -= size;
|
queued -= size;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue