Commit 838e3663 authored by Michael Niedermayer's avatar Michael Niedermayer

avcodec: move "thread emulation" warning to common code

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 391b1e39
......@@ -2890,9 +2890,6 @@ static int opt_duration(const char *opt, const char *arg)
static int opt_thread_count(const char *opt, const char *arg)
{
thread_count= parse_number_or_die(opt, arg, OPT_INT64, 0, INT_MAX);
#if !HAVE_THREADS
fprintf(stderr, "Warning: not compiled with thread support, using thread emulation\n");
#endif
return 0;
}
......
......@@ -576,6 +576,9 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
}
avctx->frame_number = 0;
if (!HAVE_THREADS)
av_log(avctx, AV_LOG_WARNING, "Warning: not compiled with thread support, using thread emulation\n");
if (HAVE_THREADS && !avctx->thread_opaque) {
ret = ff_thread_init(avctx);
if (ret < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment