diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2004-02-23 20:56:56 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-02-23 20:56:56 +0000 |
commit | c62c07d3d7d204527bfa991bac1204cbb593747b (patch) | |
tree | 207c61727f1c992fe1a05eef9c96a7cc34f6d143 /ffmpeg.c | |
parent | c0a2c42f59329811fc08a2c982d394ab49204b01 (diff) | |
download | ffmpeg-c62c07d3d7d204527bfa991bac1204cbb593747b.tar.gz |
multithreaded mpeg2 decoding
Originally committed as revision 2810 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r-- | ffmpeg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -2256,6 +2256,11 @@ static void opt_input_file(const char *filename) /* update the current parameters so that they match the one of the input stream */ for(i=0;i<ic->nb_streams;i++) { AVCodecContext *enc = &ic->streams[i]->codec; +#if defined(HAVE_PTHREADS) || defined(HAVE_W32THREADS) + if(thread_count>1) + avcodec_thread_init(enc, thread_count); +#endif + enc->thread_count= thread_count; switch(enc->codec_type) { case CODEC_TYPE_AUDIO: //fprintf(stderr, "\nInput Audio channels: %d", enc->channels); |