avcodec/libstagefright: Check for pthread_create() failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-06-07 20:39:27 +02:00
parent 40cc3be73c
commit 4c4c3d5d5a
1 changed files with 2 additions and 1 deletions

View File

@ -364,7 +364,8 @@ static int Stagefright_decode_frame(AVCodecContext *avctx, void *data,
AVFrame *ret_frame;
if (!s->thread_started) {
pthread_create(&s->decode_thread_id, NULL, &decode_thread, avctx);
if(pthread_create(&s->decode_thread_id, NULL, &decode_thread, avctx))
return AVERROR(ENOMEM);
s->thread_started = true;
}