mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
fix: Fix toxav_basic_test
buffer overflow.
We should pass the number of samples, not the byte size of `PCM`.
This commit is contained in:
parent
2073d02c33
commit
28b5e512a2
3
.github/settings.yml
vendored
3
.github/settings.yml
vendored
|
@ -12,8 +12,7 @@ branches:
|
||||||
protection:
|
protection:
|
||||||
required_status_checks:
|
required_status_checks:
|
||||||
contexts:
|
contexts:
|
||||||
# TODO(iphydf): Make asan required once errors are fixed.
|
- "bazel-asan"
|
||||||
#- "bazel-asan"
|
|
||||||
- "bazel-debug"
|
- "bazel-debug"
|
||||||
- "bazel-release"
|
- "bazel-release"
|
||||||
- "bazel-tsan"
|
- "bazel-tsan"
|
||||||
|
|
|
@ -103,7 +103,7 @@ static void iterate_tox(Tox *bootstrap, Tox *Alice, Tox *Bob)
|
||||||
static bool toxav_audio_send_frame_helper(ToxAV *av, uint32_t friend_number, Toxav_Err_Send_Frame *error)
|
static bool toxav_audio_send_frame_helper(ToxAV *av, uint32_t friend_number, Toxav_Err_Send_Frame *error)
|
||||||
{
|
{
|
||||||
static const int16_t PCM[960] = {0};
|
static const int16_t PCM[960] = {0};
|
||||||
return toxav_audio_send_frame(av, 0, PCM, sizeof(PCM), 1, 48000, nullptr);
|
return toxav_audio_send_frame(av, 0, PCM, 960, 1, 48000, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void regular_call_flow(
|
static void regular_call_flow(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user