Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-07 21:39:27 +0300
committerMichael Niedermayer <michaelni@gmx.at>2015-06-07 22:20:21 +0300
commit4c4c3d5d5abb8192b42d6d18241079929e7317e1 (patch)
tree35198aa0be8d389adb3b0360338a9977ded39e2c /libavcodec/libstagefright.cpp
parent40cc3be73c2cd4d8ee8e5ece6dad2e120af373d8 (diff)
avcodec/libstagefright: Check for pthread_create() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/libstagefright.cpp')
-rw-r--r--libavcodec/libstagefright.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/libstagefright.cpp b/libavcodec/libstagefright.cpp
index 44d7ea1492..11d6038775 100644
--- a/libavcodec/libstagefright.cpp
+++ b/libavcodec/libstagefright.cpp
@@ -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;
}