fix memleak due to not delete audio_fifo and video_fifo

This commit is contained in:
Isaac Connor 2021-04-17 12:50:04 -04:00
parent d598edc7df
commit 5b9745b652
1 changed files with 8 additions and 0 deletions

View File

@ -3220,6 +3220,14 @@ int Monitor::Close() {
analysis_thread->Stop();
}
packetqueue.clear();
if (audio_fifo) {
delete audio_fifo;
audio_fifo = nullptr;
}
if (video_fifo) {
delete video_fifo;
video_fifo = nullptr;
}
std::lock_guard<std::mutex> lck(event_mutex);
if (event) {