aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/w32thread.c
diff options
context:
space:
mode:
authorMaksym Veremeyenko <verem@m1.tv>2011-03-30 12:36:15 +0200
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-03-30 12:36:52 +0200
commitdd9134c22ed601a97122c64f23aed56c6f96cd9a (patch)
tree6967cc8b191b42dcd43c856daff329a2810ece42 /libavcodec/w32thread.c
parent3efaa24f85d74e0cad6e730dd047412a1930e9cf (diff)
downloadffmpeg-dd9134c22ed601a97122c64f23aed56c6f96cd9a.tar.gz
Fix compilation with win32 threads.after 'unbreak avcodec_thread_init'
Diffstat (limited to 'libavcodec/w32thread.c')
-rw-r--r--libavcodec/w32thread.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/w32thread.c b/libavcodec/w32thread.c
index f905077015..7c4c760e6c 100644
--- a/libavcodec/w32thread.c
+++ b/libavcodec/w32thread.c
@@ -137,11 +137,11 @@ int ff_thread_init(AVCodecContext *s){
s->active_thread_type= FF_THREAD_SLICE;
- if (thread_count <= 1)
+ if (s->thread_count <= 1)
return 0;
assert(!s->thread_opaque);
- c= av_mallocz(sizeof(ThreadContext)*thread_count);
+ c= av_mallocz(sizeof(ThreadContext)*s->thread_count);
s->thread_opaque= c;
if(!(c[0].work_sem = CreateSemaphore(NULL, 0, INT_MAX, NULL)))
goto fail;
@@ -150,7 +150,7 @@ int ff_thread_init(AVCodecContext *s){
if(!(c[0].done_sem = CreateSemaphore(NULL, 0, INT_MAX, NULL)))
goto fail;
- for(i=0; i<thread_count; i++){
+ for(i=0; i<s->thread_count; i++){
//printf("init semaphors %d\n", i); fflush(stdout);
c[i].avctx= s;
c[i].work_sem = c[0].work_sem;