From e1e35344fed9e939b17d8202a8a62060f207d4d0 Mon Sep 17 00:00:00 2001 From: Moe Date: Sat, 7 Oct 2023 10:01:47 -0700 Subject: [PATCH] fix "Send Frames" toggle for object when motion off --- libs/ffmpeg/builders.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ffmpeg/builders.js b/libs/ffmpeg/builders.js index faa52386..eca1fe1c 100644 --- a/libs/ffmpeg/builders.js +++ b/libs/ffmpeg/builders.js @@ -617,7 +617,8 @@ module.exports = (s,config,lang) => { const sendFramesGlobally = (e.details.detector_send_frames === '1') const objectDetectorOutputIsEnabled = (e.details.detector_use_detect_object === '1') const builtInMotionDetectorIsEnabled = (e.details.detector_pam === '1') - const sendFramesToObjectDetector = (e.details.detector_send_frames_object !== '0' && e.details.detector_use_detect_object === '1') + const objectDetectorSendFrames = e.details.detector_send_frames_object !== '0' || e.details.detector_pam !== '1' + const sendFramesToObjectDetector = (objectDetectorSendFrames && e.details.detector_use_detect_object === '1') const baseWidth = e.details.detector_scale_x ? e.details.detector_scale_x : '640' const baseHeight = e.details.detector_scale_y ? e.details.detector_scale_y : '480' const baseDimensionsFlag = `-s ${baseWidth}x${baseHeight}`