From eb701a5f0829daf3e9d0f677b05371c9e64ee095 Mon Sep 17 00:00:00 2001 From: Jonathan Thomas Date: Fri, 7 Feb 2020 17:33:54 -0600 Subject: [PATCH] Merging this PR from https://github.com/OpenShot/libopenshot/pull/416 into release branch. Tested locally and did not see any crazy memory demands from this. --- src/Qt/VideoCacheThread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Qt/VideoCacheThread.cpp b/src/Qt/VideoCacheThread.cpp index 46b6f030a..6cff46ba8 100644 --- a/src/Qt/VideoCacheThread.cpp +++ b/src/Qt/VideoCacheThread.cpp @@ -29,13 +29,14 @@ */ #include "../../include/Qt/VideoCacheThread.h" +#include namespace openshot { // Constructor VideoCacheThread::VideoCacheThread() : Thread("video-cache"), speed(1), is_playing(false), position(1) - , reader(NULL), max_frames(OPEN_MP_NUM_PROCESSORS * 2), current_display_frame(1) + , reader(NULL), max_frames(std::min(OPEN_MP_NUM_PROCESSORS * 8, 64)), current_display_frame(1) { }