1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-06-20 06:16:02 +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

@ -1866,7 +1866,7 @@ eos: // end of slice
}
static int slice_decode_thread(AVCodecContext *c, void *arg){
MpegEncContext *s= arg;
MpegEncContext *s= *(void**)arg;
const uint8_t *buf= s->gb.buffer;
int mb_y= s->start_mb_y;
@ -2299,7 +2299,7 @@ static int decode_chunks(AVCodecContext *avctx,
if(avctx->thread_count > 1){
int i;
avctx->execute(avctx, slice_decode_thread, (void**)&(s2->thread_context[0]), NULL, s->slice_count);
avctx->execute(avctx, slice_decode_thread, (void**)&(s2->thread_context[0]), NULL, s->slice_count, sizeof(void*));
for(i=0; i<s->slice_count; i++)
s2->error_count += s2->thread_context[i]->error_count;
}