diff mpeg12.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 21df17686936
children cf4d575b1982
line wrap: on
line diff
--- a/mpeg12.c	Wed Nov 12 17:29:02 2008 +0000
+++ b/mpeg12.c	Wed Nov 12 17:47:23 2008 +0000
@@ -1866,7 +1866,7 @@
 }
 
 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 @@
                 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;
                 }