diff options
Diffstat (limited to 'libavfilter/pthread.c')
-rw-r--r-- | libavfilter/pthread.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/pthread.c b/libavfilter/pthread.c index dd3b174..070b3bd 100644 --- a/libavfilter/pthread.c +++ b/libavfilter/pthread.c @@ -1,19 +1,19 @@ /* * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -34,6 +34,8 @@ #if HAVE_PTHREADS #include <pthread.h> +#elif HAVE_OS2THREADS +#include "compat/os2threads.h" #elif HAVE_W32THREADS #include "compat/w32pthreads.h" #endif @@ -157,7 +159,6 @@ static int thread_init_internal(ThreadContext *c, int nb_threads) if (!nb_threads) { int nb_cpus = av_cpu_count(); - av_log(c->graph, AV_LOG_DEBUG, "Detected %d logical cores.\n", nb_cpus); // use number of cores + 1 as thread count if there is more than one if (nb_cpus > 1) nb_threads = nb_cpus + 1; @@ -169,7 +170,7 @@ static int thread_init_internal(ThreadContext *c, int nb_threads) return 1; c->nb_threads = nb_threads; - c->workers = av_mallocz(sizeof(*c->workers) * nb_threads); + c->workers = av_mallocz_array(sizeof(*c->workers), nb_threads); if (!c->workers) return AVERROR(ENOMEM); |