[FFmpeg-cvslog] pthread: check pthread_create() return value.
Michael Niedermayer
git at videolan.org
Sun Nov 27 06:24:54 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Nov 27 06:17:03 2011 +0100| [47044625ba0829d10e48f8c205e2c976181de01a] | committer: Michael Niedermayer
pthread: check pthread_create() return value.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=47044625ba0829d10e48f8c205e2c976181de01a
---
libavcodec/pthread.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index ad1fe12..e7542a6 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;
More information about the ffmpeg-cvslog
mailing list