pthreads: fix segfault due to the thread beimg killed before it has been allocated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/2/head
Michael Niedermayer 13 years ago
parent cb8db6423a
commit 61c2cec957
  1. 1
      libavcodec/pthread.c

@ -658,6 +658,7 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
pthread_cond_signal(&p->input_cond);
pthread_mutex_unlock(&p->mutex);
if(p->thread)
pthread_join(p->thread, NULL);
if (codec->close)

Loading…
Cancel
Save