Added a lock around adding missing frame images (in FFmpegReader), which might be causing crashes, and fixed a log issue inside the FrameMapper, which also might be affecting performance and/or causing crashes.

This commit is contained in:
Jonathan Thomas
2016-04-11 17:43:56 -05:00
parent f71550b014
commit 9503483a5d
2 changed files with 6 additions and 8 deletions

View File

@@ -381,11 +381,11 @@ tr1::shared_ptr<Frame> FrameMapper::GetFrame(long int requested_frame) throw(Rea
// Allow nested OpenMP sections
omp_set_nested(true);
// Debug output
AppendDebugMethod("FrameMapper::GetFrame (Loop through frames)", "requested_frame", requested_frame, "minimum_frames", minimum_frames, "", -1, "", -1, "", -1, "", -1);
#pragma omp parallel
{
// Debug output
AppendDebugMethod("FrameMapper::GetFrame (Loop through frames)", "requested_frame", requested_frame, "minimum_frames", minimum_frames, "", -1, "", -1, "", -1, "", -1);
// Loop through all requested frames, each frame gets it's own thread
#pragma omp for ordered
for (long int frame_number = requested_frame; frame_number < requested_frame + minimum_frames; frame_number++)