diff options
Diffstat (limited to 'source/blender/blenkernel/intern/writeffmpeg.c')
-rw-r--r-- | source/blender/blenkernel/intern/writeffmpeg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/writeffmpeg.c b/source/blender/blenkernel/intern/writeffmpeg.c index e6adad765c3..0991d804882 100644 --- a/source/blender/blenkernel/intern/writeffmpeg.c +++ b/source/blender/blenkernel/intern/writeffmpeg.c @@ -37,6 +37,7 @@ # endif # include "BLI_math_base.h" +# include "BLI_threads.h" # include "BLI_utildefines.h" # include "BKE_global.h" @@ -566,8 +567,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context, /* Set up the codec context */ c = st->codec; - c->thread_count = 0; - c->thread_type = FF_THREAD_FRAME; + c->thread_count = BLI_system_thread_count(); + c->thread_type = FF_THREAD_SLICE; c->codec_id = codec_id; c->codec_type = AVMEDIA_TYPE_VIDEO; @@ -780,8 +781,8 @@ static AVStream *alloc_audio_stream(FFMpegContext *context, st->id = 1; c = st->codec; - c->thread_count = 0; - c->thread_type = FF_THREAD_FRAME; + c->thread_count = BLI_system_thread_count(); + c->thread_type = FF_THREAD_SLICE; c->codec_id = codec_id; c->codec_type = AVMEDIA_TYPE_AUDIO; |