diff options
author | Cheng Sun <cheng.sun@ymail.com> | 2011-11-26 10:45:36 -0800 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-11-26 10:46:08 -0800 |
commit | e524eadbf8ac568fcab7fa8f9520fad013beb91a (patch) | |
tree | 8a727d1eef42cec01df6aa48ee6e011d24342015 /libavcodec | |
parent | 3d1af11df49c9bd27f6677ec2fa327b379144e11 (diff) | |
download | ffmpeg-e524eadbf8ac568fcab7fa8f9520fad013beb91a.tar.gz |
[PATCH] Fix crash when initializing multi-threaded decoding for corrupted file.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/pthread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index 3364376a66..dae28e6f5e 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -651,7 +651,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); |