summaryrefslogtreecommitdiff
path: root/libavformat/udp.c
diff options
context:
space:
mode:
authorZhao Zhili <quinkblack@foxmail.com>2021-06-21 22:32:49 +0800
committerJun Zhao <barryjzhao@tencent.com>2021-07-10 15:35:06 +0800
commit30ca9980ffb885bfdf433302e5338021eef578fe (patch)
tree447851801fcab7bbe1e7a6ad7bfb570ec5585900 /libavformat/udp.c
parent7ee17ec7e46afef0e0af20af196292ec75f50b62 (diff)
downloadffmpeg-30ca9980ffb885bfdf433302e5338021eef578fe.tar.gz
avformat/udp: fix check for pthread_cond_wait return value
POSIX errno is positive. We have strict_pthread_cond_wait to handle error code during development. Signed-off-by: zhilizhao <zhilizhao@tencent.com> Reviewed-by: Jun Zhao <barryjzhao@tencent.com>
Diffstat (limited to 'libavformat/udp.c')
-rw-r--r--libavformat/udp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libavformat/udp.c b/libavformat/udp.c
index 9b9d3de197..bbe5aecc46 100644
--- a/libavformat/udp.c
+++ b/libavformat/udp.c
@@ -550,9 +550,7 @@ static void *circular_buffer_task_tx( void *_URLContext)
while (len<4) {
if (s->close_req)
goto end;
- if (pthread_cond_wait(&s->cond, &s->mutex) < 0) {
- goto end;
- }
+ pthread_cond_wait(&s->cond, &s->mutex);
len = av_fifo_size(s->fifo);
}