Skip to content

Commit 3321042

Browse files
committed
Raise preview cache to CPUs*8 frames, max 64
1 parent 49972b2 commit 3321042

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Qt/VideoCacheThread.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@
2929
*/
3030

3131
#include "../../include/Qt/VideoCacheThread.h"
32+
#include <algorithm>
3233

3334
namespace openshot
3435
{
3536
// Constructor
3637
VideoCacheThread::VideoCacheThread()
3738
: Thread("video-cache"), speed(1), is_playing(false), position(1)
38-
, reader(NULL), max_frames(OPEN_MP_NUM_PROCESSORS * 2), current_display_frame(1)
39+
, reader(NULL), max_frames(std::min(OPEN_MP_NUM_PROCESSORS * 8, 64)), current_display_frame(1)
3940
{
4041
}
4142

0 commit comments

Comments
 (0)