You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
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:
@@ -1561,13 +1561,11 @@ bool FFmpegReader::CheckMissingFrame(long int requested_frame)
|
||||
// Create missing frame (and copy image from previous frame)
|
||||
tr1::shared_ptr<Frame> missing_frame = CreateFrame(itr->second);
|
||||
if (last_video_frame != NULL && missing_frame != NULL) {
|
||||
missing_frame->AddImage(tr1::shared_ptr<QImage>(new QImage(*last_video_frame->GetImage())), true);
|
||||
|
||||
// Add this frame to the processed map (since it's already done)
|
||||
{
|
||||
const GenericScopedLock<CriticalSection> lock(processingCriticalSection);
|
||||
processed_video_frames[itr->second] = itr->second;
|
||||
}
|
||||
const GenericScopedLock<CriticalSection> lock(processingCriticalSection);
|
||||
missing_frame->AddImage(tr1::shared_ptr<QImage>(new QImage(*last_video_frame->GetImage())), true);
|
||||
processed_video_frames[itr->second] = itr->second;
|
||||
|
||||
// Remove missing frame from map
|
||||
missing_video_frames.erase(itr);
|
||||
|
||||
Reference in New Issue
Block a user