summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-02-23 20:56:56 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-02-23 20:56:56 +0000
commitc62c07d3d7d204527bfa991bac1204cbb593747b (patch)
tree207c61727f1c992fe1a05eef9c96a7cc34f6d143 /ffmpeg.c
parentc0a2c42f59329811fc08a2c982d394ab49204b01 (diff)
multithreaded mpeg2 decoding
Originally committed as revision 2810 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index 8d2264bffa..138d531215 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -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);