]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/pthread.c
Fixed-point LSP and LPC decoding routines for ACELP-based codecs
[ffmpeg] / libavcodec / pthread.c
index 00febde426f92bf20cc4a5186a170382b551476a..702adb533d4e86364f98a372d6b5349bc8ee3ec4 100644 (file)
@@ -42,7 +42,7 @@ typedef struct ThreadContext {
     int done;
 } ThreadContext;
 
-static void* worker(void *v)
+static void* attribute_align_arg worker(void *v)
 {
     AVCodecContext *avctx = v;
     ThreadContext *c = avctx->thread_opaque;
@@ -97,7 +97,7 @@ void avcodec_thread_free(AVCodecContext *avctx)
     pthread_cond_destroy(&c->current_job_cond);
     pthread_cond_destroy(&c->last_job_cond);
     av_free(c->workers);
-    av_free(c);
+    av_freep(&avctx->thread_opaque);
 }
 
 int avcodec_thread_execute(AVCodecContext *avctx, action_t* func, void **arg, int *ret, int job_count)