mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-28 14:01:27 +00:00
pthreads: fix segfault due to the thread beimg killed before it has been allocated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
cb8db6423a
commit
61c2cec957
@ -658,7 +658,8 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
|
||||
pthread_cond_signal(&p->input_cond);
|
||||
pthread_mutex_unlock(&p->mutex);
|
||||
|
||||
pthread_join(p->thread, NULL);
|
||||
if(p->thread)
|
||||
pthread_join(p->thread, NULL);
|
||||
|
||||
if (codec->close)
|
||||
codec->close(p->avctx);
|
||||
|
Loading…
Reference in New Issue
Block a user