From 47044625ba0829d10e48f8c205e2c976181de01a Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Sun, 27 Nov 2011 06:17:03 +0100 Subject: [PATCH] pthread: check pthread_create() return value. Signed-off-by: Michael Niedermayer --- libavcodec/pthread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index ad1fe122e1..e7542a66f4 100644 --- a/libavcodec/pthread.c +++ b/libavcodec/pthread.c @@ -766,6 +766,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) + goto error; } return 0;