Mercurial > libavcodec.hg
comparison utils.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 | f5298dd1e61c |
children | 596677256482 |
comparison
equal
deleted
inserted
replaced
8128:e2241dd85c65 | 8129:a9734fe0811e |
---|---|
366 s->height); | 366 s->height); |
367 s->release_buffer(s, &temp_pic); // Release old frame | 367 s->release_buffer(s, &temp_pic); // Release old frame |
368 return 0; | 368 return 0; |
369 } | 369 } |
370 | 370 |
371 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void **arg, int *ret, int count){ | 371 int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size){ |
372 int i; | 372 int i; |
373 | 373 |
374 for(i=0; i<count; i++){ | 374 for(i=0; i<count; i++){ |
375 int r= func(c, arg[i]); | 375 int r= func(c, (char*)arg + i*size); |
376 if(ret) ret[i]= r; | 376 if(ret) ret[i]= r; |
377 } | 377 } |
378 return 0; | 378 return 0; |
379 } | 379 } |
380 | 380 |