A Reolink camera recording failed 19 seconds into a planned 30-second clip when an audio packet arrived with an out-of-order timestamp. The unfinished file remained behind, and the unexpected error also stopped the surrounding automation.

Simone Chemelli adds a check to Home Assistant’s recorder that discards these packets before writing the file. A small gap in picture or sound replaces the loss of the entire clip; a regression test reproduces the failure and verifies that recording completes.