Mercurial > libavcodec.hg
diff os2thread.c @ 8129:a9734fe0811e libavcodec
Making it easier to send arbitrary structures as work orders to MT workers
author | romansh |
---|---|
date | Wed, 12 Nov 2008 17:47:23 +0000 |
parents | 8fbbe12e0c39 |
children | d7ef6611a49e |
line wrap: on
line diff
--- a/os2thread.c Wed Nov 12 17:29:02 2008 +0000 +++ b/os2thread.c Wed Nov 12 17:47:23 2008 +0000 @@ -81,7 +81,7 @@ av_freep(&s->thread_opaque); } -int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void **arg, int *ret, int count){ +int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){ ThreadContext *c= s->thread_opaque; int i; @@ -92,7 +92,7 @@ for(i=0; i<count; i++){ - c[i].arg= arg[i]; + c[i].arg= (char*)arg + i*size; c[i].func= func; c[i].ret= 12345;