pthread: return proper error code on pthread_create failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
e0c7128302
commit
5420523ae3
@ -875,7 +875,8 @@ static int frame_thread_init(AVCodecContext *avctx)
|
|||||||
|
|
||||||
if (err) goto error;
|
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)
|
if(!p->thread_init)
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user