projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f14a834
)
Enable multi-threaded decoding with FFmpeg (helps with #1887).
author
Carl Hetherington
<cth@carlh.net>
Sun, 28 Feb 2021 20:50:49 +0000
(21:50 +0100)
committer
Carl Hetherington
<cth@carlh.net>
Sun, 28 Feb 2021 20:50:49 +0000
(21:50 +0100)
src/lib/ffmpeg.cc
patch
|
blob
|
history
diff --git
a/src/lib/ffmpeg.cc
b/src/lib/ffmpeg.cc
index 0e70d9c6f89350f12e5e1ffba1573f2d3af5aed2..f8398763e8185c59b096a7c9484844dedc5400a0 100644
(file)
--- a/
src/lib/ffmpeg.cc
+++ b/
src/lib/ffmpeg.cc
@@
-203,6
+203,9
@@
DCPOMATIC_DISABLE_WARNINGS
for (uint32_t i = 0; i < _format_context->nb_streams; ++i) {
auto context = _format_context->streams[i]->codec;
+ context->thread_count = 8;
+ context->thread_type = FF_THREAD_FRAME | FF_THREAD_SLICE;
+
AVCodec* codec = avcodec_find_decoder (context->codec_id);
if (codec) {