summaryrefslogtreecommitdiff
path: root/libavcodec/pthread.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-11-28 01:07:11 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-11-28 01:07:11 +0100
commit1e19927f12a2a65954aabf38b584025beff15cc3 (patch)
tree33c88297cb164490ebe38b67cf353029d9fb83f2 /libavcodec/pthread.c
parentca55606a5127a9ddb10e4c1971c56e3e69bfd864 (diff)
parent1f948745c3cbe45c4ccd5d8996fc885d826bf3ff (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: vc1: use an enum for Frame Coding Mode doc: cleanup filter section indeo3: error out if no motion vector is set. x86inc: Flag shufps as an floating-point instruction for the AVX emulation code. mpegaudio: do not use init_static_data() for initializing tables. musepack: fix signed shift overflow in mpc_read_packet() mov: Make format string match variable type. wmavoice: Make format string match variable type. vc1: select interlaced scan table by FCM element Generalize RIFF INFO tag support; support reading INFO tag in wav pthread: track thread existence in a separate variable. Conflicts: doc/filters.texi libavcodec/pthread.c libavformat/avi.c libavformat/riff.c libavformat/riff.h libavformat/wav.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/pthread.c')
-rw-r--r--libavcodec/pthread.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index e7542a66f4..4d64338eba 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -72,7 +72,7 @@ typedef struct PerThreadContext {
struct FrameThreadContext *parent;
pthread_t thread;
- int thread_created;
+ int thread_init;
pthread_cond_t input_cond; ///< Used to wait for a new packet from the main thread.
pthread_cond_t progress_cond; ///< Used by child threads to wait for progress to change.
pthread_cond_t output_cond; ///< Used by the main thread to wait for frames to finish.
@@ -659,9 +659,9 @@ static void frame_thread_free(AVCodecContext *avctx, int thread_count)
pthread_cond_signal(&p->input_cond);
pthread_mutex_unlock(&p->mutex);
- if (p->thread_created)
+ if (p->thread_init)
pthread_join(p->thread, NULL);
- p->thread_created=0;
+ p->thread_init=0;
if (codec->close)
codec->close(p->avctx);
@@ -765,8 +765,8 @@ static int frame_thread_init(AVCodecContext *avctx)
if (err) goto error;
- p->thread_created= !pthread_create(&p->thread, NULL, frame_worker_thread, p);
- if(!p->thread_created)
+ p->thread_init= !pthread_create(&p->thread, NULL, frame_worker_thread, p);
+ if(!p->thread_init)
goto error;
}