Browse code

pthread: check pthread_create() return value.

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

Michael Niedermayer authored on 2011/11/27 14:17:03
Showing 1 changed files
... ...
@@ -766,6 +766,8 @@ static int frame_thread_init(AVCodecContext *avctx)
766 766
         if (err) goto error;
767 767
 
768 768
         p->thread_created= !pthread_create(&p->thread, NULL, frame_worker_thread, p);
769
+        if(!p->thread_created)
770
+            goto error;
769 771
     }
770 772
 
771 773
     return 0;