Making it easier to send arbitrary structures as work orders to MT workers
Originally committed as revision 15804 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
52ece41057
commit
3a84713aaa
11 changed files with 41 additions and 37 deletions
|
@ -81,7 +81,7 @@ void avcodec_thread_free(AVCodecContext *s){
|
|||
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 @@ int avcodec_thread_execute(AVCodecContext *s, int (*func)(AVCodecContext *c2, vo
|
|||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue