mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-05-09 23:23:34 -04:00
fix: address multiple bugs across core source files
- zm_analysis_thread.cpp, zm_decoder_thread.cpp: Fix potential deadlock in Start() by calling Stop() before joining thread - zm_camera.cpp: Add null check after avformat_alloc_context() - zm_comms.cpp: Fix memory leak in InetSocket::bind(), fix error message typo in deleteReader(), fix clearReaders/clearWriters to recalculate mMaxFd properly - zm_config.cpp: Fix potential buffer underrun when parsing config files, fix misplaced SERVER_ID check logic - zm_db.cpp: Fix logger level not restored on early return in zmDbDo(), fix empty string access in DB_HOST parsing - zm_event.cpp: Fix typo "foudn" -> "found", fix memory leak with Tag allocation, fix variable shadowing with video_file - zm_event_tag.cpp: Fix null dereference when AssignedBy is NULL - zm_eventstream.cpp: Fix dangling pointer bugs with emplace_back (use auto& instead of auto), fix memory leak in loadInitialEventData Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,6 +14,7 @@ DecoderThread::~DecoderThread() {
|
||||
}
|
||||
|
||||
void DecoderThread::Start() {
|
||||
Stop(); // Signal any running thread to terminate first
|
||||
if (thread_.joinable()) thread_.join();
|
||||
terminate_ = false;
|
||||
thread_ = std::thread(&DecoderThread::Run, this);
|
||||
|
||||
Reference in New Issue
Block a user