]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/blobdiff - libavcodec/os2thread.c
frsh: Export information about the last RTP contract and VRES
[frescor/ffmpeg.git] / libavcodec / os2thread.c
index 03df9117dba6019ed31835d6bc81a349b51c755e..edebc9a6c8e95c2b96f50fe25a838f8269b5f051 100644 (file)
@@ -15,8 +15,7 @@
  *
  * You should have received a copy of the GNU Lesser General Public
  * License along with FFmpeg; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
- *
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 //#define DEBUG
 
@@ -40,7 +39,7 @@ typedef struct ThreadContext{
 }ThreadContext;
 
 
-void thread_func(void *v){
+void attribute_align_arg thread_func(void *v){
     ThreadContext *c= v;
 
     for(;;){
@@ -82,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;
 
@@ -93,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;