summaryrefslogtreecommitdiffstats
path: root/libavdevice/iec61883.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-07 18:57:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-07 18:57:55 +0200
commit7c453277a399bc81553c6110efd81a0957117138 (patch)
tree08227380e10e55dc507c97e53d2972280922a32c /libavdevice/iec61883.c
parentddda9cee1c4b308921c37a61efda411244152e8f (diff)
downloadffmpeg-streaming-7c453277a399bc81553c6110efd81a0957117138.zip
ffmpeg-streaming-7c453277a399bc81553c6110efd81a0957117138.tar.gz
avdevice/iec61883: Check pthread init for failures
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/iec61883.c')
-rw-r--r--libavdevice/iec61883.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavdevice/iec61883.c b/libavdevice/iec61883.c
index b29aad1..01e5289 100644
--- a/libavdevice/iec61883.c
+++ b/libavdevice/iec61883.c
@@ -392,9 +392,12 @@ static int iec61883_read_header(AVFormatContext *context)
#if THREADS
dv->thread_loop = 1;
- pthread_mutex_init(&dv->mutex, NULL);
- pthread_cond_init(&dv->cond, NULL);
- pthread_create(&dv->receive_task_thread, NULL, iec61883_receive_task, dv);
+ if (pthread_mutex_init(&dv->mutex, NULL))
+ goto fail;
+ if (pthread_cond_init(&dv->cond, NULL))
+ goto fail;
+ if (pthread_create(&dv->receive_task_thread, NULL, iec61883_receive_task, dv))
+ goto fail;
#endif
return 0;
OpenPOWER on IntegriCloud