Rust binding bug.

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’.

Thanks. May you report the issue in GitHub please?

CC @nazar-pc

Yes, looks like something I missed. Feel free to submit PR as well.

I will submit a PR soon with fixes to a bunch of things including this one