ffmpeg | branch: master | Michael Niedermayer <michae...@gmx.at> | Sun Jun  7 
20:39:27 2015 +0200| [4c4c3d5d5abb8192b42d6d18241079929e7317e1] | committer: 
Michael Niedermayer

avcodec/libstagefright: Check for pthread_create() failure

Signed-off-by: Michael Niedermayer <michae...@gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4c4c3d5d5abb8192b42d6d18241079929e7317e1
---

 libavcodec/libstagefright.cpp |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libstagefright.cpp b/libavcodec/libstagefright.cpp
index 44d7ea1..11d6038 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;
     }
 

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to