Browse Source

[PATCH] Fix crash when initializing multi-threaded decoding for corrupted file.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
tags/n0.9
Cheng Sun Ronald S. Bultje 14 years ago
parent
commit
e524eadbf8
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      libavcodec/pthread.c

+ 2
- 1
libavcodec/pthread.c View File

@@ -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);


Loading…
Cancel
Save