diff options
author | Marton Balint <cus@passwd.hu> | 2012-03-24 23:34:43 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-25 12:22:06 +0200 |
commit | 5420523ae3aa379a3274cf715e35ed18efbe6158 (patch) | |
tree | a096c4ae8ff384abffe6adcc10f91c4ff4504562 | |
parent | e0c71283023163dc6431f000cdb5a661b05beae0 (diff) | |
download | ffmpeg-5420523ae3aa379a3274cf715e35ed18efbe6158.tar.gz |
pthread: return proper error code on pthread_create failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/pthread.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c index e155f73680..e253eb9c36 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; } |