From 172eaad8bd41c6978c33d8f369dcbee3fd05d0ee Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 22 Jul 2020 22:45:11 -0400 Subject: [PATCH] fix capture jpeg saving due to use of std::string --- src/zm_event.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 0193172ac..3a88ff536 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -495,7 +495,7 @@ void Event::AddFramesInternal(int n_frames, int start_frame, Image **images, str frames++; if ( monitor->GetOptSaveJPEGs() & 1 ) { - std::string event_file = stringtf(staticConfig.capture_file_format, path, frames); + std::string event_file = stringtf(staticConfig.capture_file_format, path.c_str(), frames); Debug(1, "Writing pre-capture frame %d", frames); WriteFrameImage(images[i], *(timestamps[i]), event_file.c_str()); } @@ -606,7 +606,7 @@ void Event::AddFrame(Image *image, struct timeval timestamp, int score, Image *a score = 0; if ( monitor->GetOptSaveJPEGs() & 1 ) { - std::string event_file = stringtf(staticConfig.capture_file_format, path, frames); + std::string event_file = stringtf(staticConfig.capture_file_format, path.c_str(), frames); Debug(1, "Writing capture frame %d to %s", frames, event_file.c_str()); if ( !WriteFrameImage(image, timestamp, event_file.c_str()) ) { Error("Failed to write frame image");