[FFmpeg-cvslog] avformat/udp: fix check for pthread_cond_wait return value
Zhao Zhili
git at videolan.org
Sat Jul 10 10:46:43 EEST 2021
ffmpeg | branch: master | Zhao Zhili <quinkblack at foxmail.com> | Mon Jun 21 22:32:49 2021 +0800| [30ca9980ffb885bfdf433302e5338021eef578fe] | committer: Jun Zhao
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 at tencent.com>
Reviewed-by: Jun Zhao <barryjzhao at tencent.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=30ca9980ffb885bfdf433302e5338021eef578fe
---
libavformat/udp.c | 4 +---
1 file changed, 1 insertion(+), 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);
}
More information about the ffmpeg-cvslog
mailing list