diff options
author | Måns Rullgård <mans@mansr.com> | 2010-01-20 22:55:50 +0000 |
---|---|---|
committer | Måns Rullgård <mans@mansr.com> | 2010-01-20 22:55:50 +0000 |
commit | 68cf92ee5e08331d6237a836adc74b4007fab4e9 (patch) | |
tree | 940d14641a23b82d9953953457338b1e9d2e11eb /ffmpeg.c | |
parent | 5fcb865b7525f4ba6d601008bc6a2fb28be5af1e (diff) | |
download | ffmpeg-68cf92ee5e08331d6237a836adc74b4007fab4e9.tar.gz |
Always call avcodec_thread_init()
The various avcodec_thread_init() functions are updated to return
immediately after setting avctx->thread_count. This allows -threads 0
to pass through to codecs. It also simplifies the usage for apps
using libavcodec.
Originally committed as revision 21358 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 3 |
1 files changed, 0 insertions, 3 deletions
@@ -2931,7 +2931,6 @@ static void opt_input_file(const char *filename) for(i=0;i<ic->nb_streams;i++) { AVStream *st = ic->streams[i]; AVCodecContext *enc = st->codec; - if(thread_count>1) avcodec_thread_init(enc, thread_count); switch(enc->codec_type) { case CODEC_TYPE_AUDIO: @@ -3066,7 +3065,6 @@ static void new_video_stream(AVFormatContext *oc) bitstream_filters[nb_output_files][oc->nb_streams - 1]= video_bitstream_filters; video_bitstream_filters= NULL; - if(thread_count>1) avcodec_thread_init(st->codec, thread_count); video_enc = st->codec; @@ -3212,7 +3210,6 @@ static void new_audio_stream(AVFormatContext *oc) bitstream_filters[nb_output_files][oc->nb_streams - 1]= audio_bitstream_filters; audio_bitstream_filters= NULL; - if(thread_count>1) avcodec_thread_init(st->codec, thread_count); audio_enc = st->codec; |