comparison beosthread.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
121 int i; 121 int i;
122 ThreadContext *c; 122 ThreadContext *c;
123 123
124 s->thread_count= thread_count; 124 s->thread_count= thread_count;
125 125
126 if (thread_count <= 1)
127 return 0;
128
126 assert(!s->thread_opaque); 129 assert(!s->thread_opaque);
127 c= av_mallocz(sizeof(ThreadContext)*thread_count); 130 c= av_mallocz(sizeof(ThreadContext)*thread_count);
128 s->thread_opaque= c; 131 s->thread_opaque= c;
129 132
130 for(i=0; i<thread_count; i++){ 133 for(i=0; i<thread_count; i++){