diff --git a/src/FFmpegReader.cpp b/src/FFmpegReader.cpp
index 91aba7a4..9a3dcf75 100644
--- a/src/FFmpegReader.cpp
+++ b/src/FFmpegReader.cpp
@@ -1561,13 +1561,11 @@ bool FFmpegReader::CheckMissingFrame(long int requested_frame)
// Create missing frame (and copy image from previous frame)
tr1::shared_ptr missing_frame = CreateFrame(itr->second);
if (last_video_frame != NULL && missing_frame != NULL) {
- missing_frame->AddImage(tr1::shared_ptr(new QImage(*last_video_frame->GetImage())), true);
// Add this frame to the processed map (since it's already done)
- {
- const GenericScopedLock lock(processingCriticalSection);
- processed_video_frames[itr->second] = itr->second;
- }
+ const GenericScopedLock lock(processingCriticalSection);
+ missing_frame->AddImage(tr1::shared_ptr(new QImage(*last_video_frame->GetImage())), true);
+ processed_video_frames[itr->second] = itr->second;
// Remove missing frame from map
missing_video_frames.erase(itr);
diff --git a/src/FrameMapper.cpp b/src/FrameMapper.cpp
index 5b1ac2ac..04062860 100644
--- a/src/FrameMapper.cpp
+++ b/src/FrameMapper.cpp
@@ -381,11 +381,11 @@ tr1::shared_ptr 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++)