[FFmpeg-devel] [PATCH] lazily create threads in pthread.c
Alexander Strange
astrange
Sun Aug 12 19:47:25 CEST 2007
This patch changes pthread.c so that threads aren't created until
execute() requests them.
This way, you can unconditionally call avcodec_thread_init() and not
have unused threads lying around if they aren't used.
The same thing could be done with w32 and beosthread, but I haven't
got a way to test them.
It could also save one worker thread by reusing the main thread,
instead of sleeping it; I'll probably look at that later.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg-pthread-lazyinit.diff
Type: application/octet-stream
Size: 3408 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070812/88c976fe/attachment.obj>
More information about the ffmpeg-devel
mailing list