mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-10-12 11:43:13 -04:00
* Fix: JPEG snapshot generation when requested frame is unavailable in event video * Improve frame extraction fallback for unavailable timestamps - Limit ffprobe search to a small time range around the requested position - Validate the generated JPEG before considering extraction successful - Fix timestamp formatting to be locale-independent - Remove obsolete command/output handling from callers -Handle non-monotonic packet PTS order -- Do not assume ffprobe returns packets sorted by PTS -- Scan all packets in the selected time range -- Select the closest packet before and the closest packet after the requested timestamp -- Avoid selecting an incorrect fallback frame when PTS values are reordered * Use temporary files for frame extraction - Write FFmpeg output to a unique temporary file for each extraction attempt - Atomically rename the validated frame to the target path on success - Prevent failed concurrent requests from deleting a frame created by another request * Fix video frame extraction near event end * Remove frame_time condition from lookback loop Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Isaac Connor <isaac@zoneminder.com> Co-authored-by: Isaac Connor <iconnor@connortechnology.com> Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>