]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavcodec/os2thread.c
Add PCE support to the ADTS muxer.
[frescor/ffmpeg.git] / libavcodec / os2thread.c
index 5c74a7d6583c556d13f124e2883d632d5416b369..edebc9a6c8e95c2b96f50fe25a838f8269b5f051 100644 (file)
@@ -39,7 +39,7 @@ typedef struct ThreadContext{
 }ThreadContext;
 
 
-void thread_func(void *v){
+void attribute_align_arg thread_func(void *v){
     ThreadContext *c= v;
 
     for(;;){
@@ -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;