[FFmpeg-cvslog] pthread: return proper error code on pthread_create failure
Marton Balint
git at videolan.org
Sun Mar 25 12:25:55 CEST 2012
ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Sat Mar 24 23:34:43 2012 +0100| [5420523ae3aa379a3274cf715e35ed18efbe6158] | committer: Michael Niedermayer
pthread: return proper error code on pthread_create failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5420523ae3aa379a3274cf715e35ed18efbe6158
---
libavcodec/pthread.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index e155f73..e253eb9 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -875,7 +875,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;
}
More information about the ffmpeg-cvslog
mailing list