You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Moving checked_count erase command inside lock protection, to prevent crash
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user