From 724c57680e2f52aa94c9593ea707abf580f8f87e Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Mon, 22 May 2017 04:43:21 -0500 Subject: [PATCH] Moving checked_count erase command inside lock protection, to prevent crash --- src/FFmpegReader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp index 5f54e5d7..b5af90fa 100644 --- a/src/FFmpegReader.cpp +++ b/src/FFmpegReader.cpp @@ -1732,6 +1732,9 @@ void FFmpegReader::CheckWorkingFrames(bool end_of_stream, long int requested_fra ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::CheckWorkingFrames (add frame to missing cache)", "f->number", f->number, "is_seek_trash", is_seek_trash, "Missing Cache Count", missing_frames.Count(), "Working Cache Count", working_cache.Count(), "Final Cache Count", final_cache.Count(), "", -1); missing_frames.Add(f); } + + // Remove from 'checked' count + checked_frames.erase(f->number); } // Remove frame from working cache @@ -1740,9 +1743,6 @@ void FFmpegReader::CheckWorkingFrames(bool end_of_stream, long int requested_fra // Update last frame processed last_frame = f->number; - // Remove from 'checked' count - checked_frames.erase(f->number); - } else { // Seek trash, so delete the frame from the working cache, and never add it to the final cache. working_cache.Remove(f->number);