WangHoi
(Wang Hoi)
1
In rust binding, worker is backed by thread, not process.
This will cause CRASH after create multiple workers in rust.
The cause is a static variable initialization, thread unsafety.
Producer.cpp:
Producer::MangleRtpPacket()
static uint8_t buffer[4096];
static std::vectorRTC::RtpPacket::GenericExtension extensions;
An easy fix is to mark the two variables ‘static thread_local’.
ibc
(Iñaki Baz Castillo)
2
Thanks. May you report the issue in GitHub please?
CC @nazar-pc
nazar-pc
(Nazar Mokynskyi)
3
Yes, looks like something I missed. Feel free to submit PR as well.
nazar-pc
(Nazar Mokynskyi)
4
I will submit a PR soon with fixes to a bunch of things including this one