summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-22 01:35:43 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2008-06-22 01:35:43 +0000
commitdbedf2aae26c44d3d310831dd1097900d5a539d9 (patch)
treeab0c29c986a7b48fe8671a9997403237a666384a /ffmpeg.c
parent0b459fb2d8d84f90d02a755a875ae921b2871020 (diff)
enable feeder threads
Originally committed as revision 13868 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 8cfa7b348e..e20ac1141a 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -449,6 +449,11 @@ static int read_ffserver_streams(AVFormatContext *s, const char *filename)
else if (st->codec->codec_type == CODEC_TYPE_VIDEO && video_stream_copy)
st->stream_copy = 1;
+ if(!st->codec->thread_count)
+ st->codec->thread_count = 1;
+ if(st->codec->thread_count>1)
+ avcodec_thread_init(st->codec, st->codec->thread_count);
+
if(st->codec->flags & CODEC_FLAG_BITEXACT)
nopts = 1;
}