Commit Graph
1 Commits
Author SHA1 Message Date
15da89e56c Avoid buffering raw frames during watchdog resets (#24663)
* Don't buffer detect ffmpeg stdout when resetting the capture thread

reset_capture_thread waited for the terminated detect process with
communicate() on the no-frames and stale sub stream paths. communicate()
reads the process's raw frames into memory until it exits, and a stalled
detect process can write hundreds of duplicate frames per second before
it does. Use wait() on every path, as the fps-exceeded path has since
#19110; the timeout and kill still bound the wait.

* Update frigate/video/ffmpeg.py

accurately explain why wait() is safe

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>

* test(watchdog): remove non-regression child process test

The Python child exits on SIGTERM, so this test also passes with the original communicate() reset. Keep the two mock tests that distinguish the fix and remove the unused imports.

---------

Co-authored-by: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com>
2026-10-15 07:19:13 -06:00