1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-06-14 22:15:12 +02:00

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:
Roman Shaposhnik
2008-11-12 17:47:23 +00:00
parent 52ece41057
commit 3a84713aaa
11 changed files with 41 additions and 37 deletions

View File

@ -368,11 +368,11 @@ int avcodec_default_reget_buffer(AVCodecContext *s, AVFrame *pic){
return 0;
}
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void **arg, int *ret, int count){
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){
int i;
for(i=0; i<count; i++){
int r= func(c, arg[i]);
int r= func(c, (char*)arg + i*size);
if(ret) ret[i]= r;
}
return 0;