Commit 5420523a authored by Marton Balint's avatar Marton Balint Committed by Michael Niedermayer

pthread: return proper error code on pthread_create failure

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent e0c71283
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment