From d8cb0f73c387bc9ea877b2a0cdfa309572bd3839 Mon Sep 17 00:00:00 2001 From: Dave Behnke <916775+dbehnke@users.noreply.github.com> Date: Mon, 29 Dec 2025 00:01:03 -0500 Subject: [PATCH] fix: Cache filename before stopping recorder to return correct path --- reflector/CodecStream.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reflector/CodecStream.h b/reflector/CodecStream.h index 498ed25..f217309 100644 --- a/reflector/CodecStream.h +++ b/reflector/CodecStream.h @@ -39,7 +39,12 @@ public: void ResetStats(uint16_t streamid, ECodecType codectype); void ReportStats(); - std::string StopRecording() { m_Recorder.Stop(); return m_Filename; } + std::string StopRecording() { + if (!m_Recorder.IsRecording()) return ""; + std::string f = m_Filename; // This is actually CCodecStream::m_Filename set in ResetStats + m_Recorder.Stop(); + return f; + } // destructor virtual ~CCodecStream();