Mercurial > libavcodec.hg
comparison os2thread.c @ 10954:d7ef6611a49e libavcodec
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.
author | mru |
---|---|
date | Wed, 20 Jan 2010 22:55:50 +0000 |
parents | a9734fe0811e |
children | 7bfe7456e372 |
comparison
equal
deleted
inserted
replaced
10953:eb9a2581f50e | 10954:d7ef6611a49e |
---|---|
114 ThreadContext *c; | 114 ThreadContext *c; |
115 uint32_t threadid; | 115 uint32_t threadid; |
116 | 116 |
117 s->thread_count= thread_count; | 117 s->thread_count= thread_count; |
118 | 118 |
119 if (thread_count <= 1) | |
120 return 0; | |
121 | |
119 assert(!s->thread_opaque); | 122 assert(!s->thread_opaque); |
120 c= av_mallocz(sizeof(ThreadContext)*thread_count); | 123 c= av_mallocz(sizeof(ThreadContext)*thread_count); |
121 s->thread_opaque= c; | 124 s->thread_opaque= c; |
122 | 125 |
123 for(i=0; i<thread_count; i++){ | 126 for(i=0; i<thread_count; i++){ |