mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
ringbuffer: handle border cases in resampler
This commit is contained in:
parent
b2930f24b0
commit
a9c82f9472
1 changed files with 2 additions and 2 deletions
|
@ -1503,7 +1503,7 @@ G_STMT_START { \
|
||||||
memcpy (d, se, bps); \
|
memcpy (d, se, bps); \
|
||||||
se -= bps; \
|
se -= bps; \
|
||||||
*accum += outr; \
|
*accum += outr; \
|
||||||
while ((*accum << 1) >= inr) { \
|
while (d < de && (*accum << 1) >= inr) { \
|
||||||
*accum -= inr; \
|
*accum -= inr; \
|
||||||
d += bps; \
|
d += bps; \
|
||||||
} \
|
} \
|
||||||
|
@ -1521,7 +1521,7 @@ G_STMT_START { \
|
||||||
memcpy (d, se, bps); \
|
memcpy (d, se, bps); \
|
||||||
d += bps; \
|
d += bps; \
|
||||||
*accum += inr; \
|
*accum += inr; \
|
||||||
while ((*accum << 1) >= outr) { \
|
while (s <= se && (*accum << 1) >= outr) { \
|
||||||
*accum -= outr; \
|
*accum -= outr; \
|
||||||
se -= bps; \
|
se -= bps; \
|
||||||
} \
|
} \
|
||||||
|
|
Loading…
Reference in a new issue