diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-02 02:48:34 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-02 03:10:30 +0100 |
commit | 4121148388f4fd02ace89eca364904d3ea8bcfe7 (patch) | |
tree | c346f6906942b7a12c5c1f06e9d11205ea5660ab /libavcodec/utils.c | |
parent | ef611095f0d0c1256cbb6654f94cae61a60f2736 (diff) | |
parent | f15f02c204e5fe355e084923c34dda1c6c3a66ec (diff) | |
download | ffmpeg-4121148388f4fd02ace89eca364904d3ea8bcfe7.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
avconv: make -frames work for all types of streams, not just video.
bfi: K&R cosmetics
bgmc: K&R cleanup
rawdec: Set start_time to 0 for raw audio files.
Detect 'yuv2' as rawvideo also in avi.
rawdec: propagate pict_type information to the output frame
rawdec: Support more QT 1bpp rawvideo files.
avconv: free bitstream filters
threads: limit the number of automatic threads to MAX_AUTO_THREADS
avplay: K&R cleanup
fate: use rgb24 as output format for dfa tests
threads: set thread_count to 1 when thread support is disabled
threads: introduce CODEC_CAP_AUTO_THREADS and add it to libx264
Conflicts:
ffplay.c
libavcodec/avcodec.h
libavcodec/pthread.c
libavcodec/version.h
tests/ref/fate/dfa1
tests/ref/fate/dfa10
tests/ref/fate/dfa11
tests/ref/fate/dfa2
tests/ref/fate/dfa3
tests/ref/fate/dfa4
tests/ref/fate/dfa5
tests/ref/fate/dfa6
tests/ref/fate/dfa7
tests/ref/fate/dfa8
tests/ref/fate/dfa9
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/utils.c')
-rw-r--r-- | libavcodec/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/utils.c b/libavcodec/utils.c index d152ec2ae3..619b70f3fb 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -765,6 +765,8 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD goto free_and_end; } } + if (!HAVE_THREADS && !(codec->capabilities & CODEC_CAP_AUTO_THREADS)) + avctx->thread_count = 1; if (avctx->codec->max_lowres < avctx->lowres || avctx->lowres < 0) { av_log(avctx, AV_LOG_ERROR, "The maximum value for lowres supported by the decoder is %d\n", |