[FFmpeg-devel] [PATCH] pthread: return proper error code on pthread_create failure
Marton Balint
cus at passwd.hu
Sat Mar 24 23:34:43 CET 2012
---
libavcodec/pthread.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index d8f8858..4cedd93 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -879,7 +879,8 @@ static int frame_thread_init(AVCodecContext *avctx)
if (err) goto error;
- p->thread_init= !pthread_create(&p->thread, NULL, frame_worker_thread, p);
+ err = AVERROR(pthread_create(&p->thread, NULL, frame_worker_thread, p));
+ p->thread_init= !err;
if(!p->thread_init)
goto error;
}
--
1.7.3.4
More information about the ffmpeg-devel
mailing list