From 2473a45c85dce6872617b33fce396dbbd6347e8e Mon Sep 17 00:00:00 2001 From: Janne Grunau Date: Wed, 18 Jan 2012 10:53:41 +0100 Subject: threads: change the default for threads back to 1 Using threaded decoding by default breaks backward compatibility if AVHWAccel is used or if an appliction sets threadunsafe callbacks. Avconv and avplay still use -threads auto if not specified. --- avplay.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'avplay.c') diff --git a/avplay.c b/avplay.c index 85e03770e5..432afc11b3 100644 --- a/avplay.c +++ b/avplay.c @@ -2194,6 +2194,8 @@ static int stream_component_open(VideoState *is, int stream_index) if (lowres) avctx->flags |= CODEC_FLAG_EMU_EDGE; if (fast) avctx->flags2 |= CODEC_FLAG2_FAST; + if (!av_dict_get(opts, "threads", NULL, 0)) + av_dict_set(&opts, "threads", "auto", 0); if (!codec || avcodec_open2(avctx, codec, &opts) < 0) return -1; -- cgit v1.2.3