comparison w32thread.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 e68792a12c31
children fe7a77f77927
comparison
equal deleted inserted replaced
10953:eb9a2581f50e 10954:d7ef6611a49e
129 ThreadContext *c; 129 ThreadContext *c;
130 uint32_t threadid; 130 uint32_t threadid;
131 131
132 s->thread_count= thread_count; 132 s->thread_count= thread_count;
133 133
134 if (thread_count <= 1)
135 return 0;
136
134 assert(!s->thread_opaque); 137 assert(!s->thread_opaque);
135 c= av_mallocz(sizeof(ThreadContext)*thread_count); 138 c= av_mallocz(sizeof(ThreadContext)*thread_count);
136 s->thread_opaque= c; 139 s->thread_opaque= c;
137 if(!(c[0].work_sem = CreateSemaphore(NULL, 0, INT_MAX, NULL))) 140 if(!(c[0].work_sem = CreateSemaphore(NULL, 0, INT_MAX, NULL)))
138 goto fail; 141 goto fail;