remotion-dev / remotion

🎥 Make videos programmatically with React
https://remotion.dev
Other
19.59k stars 955 forks source link

`@remotion/renderer`: Fix streaming when a response payload is split in the header #3912

Closed JonnyBurger closed 1 month ago

JonnyBurger commented 1 month ago

The Node.js binary communicates with the Rust binary.

Each message has the following format: remotion_buffer:[nonce]:[size]:[message].

The communication happens oder the UNIX standard output.

This means we receive the message in chunks, and messages can be incomplete, in which case we need to wait for the next chunk before processing the message.

We had this waiting algorithm implemented, but with a flaw.
We had an infinite loop if the header remotion_buffer:[nonce]:[size] was incomplete.

Fixing this now by not processing data if this is the case and waiting for the next message.

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:54pm
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 22, 2024 9:54pm