comparison pthread.c @ 5232:238b95c5ffe2 libavcodec

set thread_opaque to NULL when freeing it
author benoit
date Fri, 06 Jul 2007 15:17:52 +0000
parents 2b72f9bc4f06
children b0a566346fb1
comparison
equal deleted inserted replaced
5231:07a97575d0c4 5232:238b95c5ffe2
95 95
96 pthread_mutex_destroy(&c->current_job_lock); 96 pthread_mutex_destroy(&c->current_job_lock);
97 pthread_cond_destroy(&c->current_job_cond); 97 pthread_cond_destroy(&c->current_job_cond);
98 pthread_cond_destroy(&c->last_job_cond); 98 pthread_cond_destroy(&c->last_job_cond);
99 av_free(c->workers); 99 av_free(c->workers);
100 av_free(c); 100 av_freep(&avctx->thread_opaque);
101 } 101 }
102 102
103 int avcodec_thread_execute(AVCodecContext *avctx, action_t* func, void **arg, int *ret, int job_count) 103 int avcodec_thread_execute(AVCodecContext *avctx, action_t* func, void **arg, int *ret, int job_count)
104 { 104 {
105 ThreadContext *c= avctx->thread_opaque; 105 ThreadContext *c= avctx->thread_opaque;