diff options
Diffstat (limited to 'common/av_common.c')
-rw-r--r-- | common/av_common.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/common/av_common.c b/common/av_common.c index eb357d9f05..2d976bbc8d 100644 --- a/common/av_common.c +++ b/common/av_common.c @@ -22,6 +22,7 @@ #include <libavutil/dict.h> #include <libavutil/opt.h> #include <libavutil/error.h> +#include <libavutil/cpu.h> #include <libavcodec/avcodec.h> #include "common/common.h" @@ -30,8 +31,6 @@ #include "av_common.h" #include "codecs.h" -#include "osdep/numcores.h" - int mp_lavc_set_extradata(AVCodecContext *avctx, void *ptr, int size) { if (size) { @@ -129,7 +128,7 @@ void mp_set_av_packet(AVPacket *dst, struct demux_packet *mpkt, AVRational *tb) void mp_set_avcodec_threads(struct mp_log *l, AVCodecContext *avctx, int threads) { if (threads == 0) { - threads = default_thread_count(); + threads = av_cpu_count(); if (threads < 1) { mp_warn(l, "Could not determine thread count to use, defaulting to 1.\n"); threads = 1; |