aboutsummaryrefslogtreecommitdiffstats
path: root/avplay.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2012-01-18 10:53:41 +0100
committerJanne Grunau <janne-libav@jannau.net>2012-01-21 13:26:44 +0100
commit2473a45c85dce6872617b33fce396dbbd6347e8e (patch)
tree771d986fe1409d274578362fae12b3e7fed8c23a /avplay.c
parentafb8b207d6c82bc063ab984b2875074457db2e4f (diff)
downloadffmpeg-2473a45c85dce6872617b33fce396dbbd6347e8e.tar.gz
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.
Diffstat (limited to 'avplay.c')
-rw-r--r--avplay.c2
1 files changed, 2 insertions, 0 deletions
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;