[vlc-commits] udp: remove useless loop in the block callback
Rémi Denis-Courmont
git at videolan.org
Wed Jun 3 19:34:51 CEST 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jun 3 20:33:57 2015 +0300| [57faaf399ac2fe748db6dca1a1057c2a8393fdb6] | committer: Rémi Denis-Courmont
udp: remove useless loop in the block callback
In case of spurious wake-up, the function will return NULL. This is OK.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=57faaf399ac2fe748db6dca1a1057c2a8393fdb6
---
modules/access/udp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/access/udp.c b/modules/access/udp.c
index 4118c96..d7d911b 100644
--- a/modules/access/udp.c
+++ b/modules/access/udp.c
@@ -240,7 +240,7 @@ static block_t *BlockUDP( access_t *p_access )
return NULL;
vlc_fifo_Lock(sys->fifo);
- while (vlc_fifo_IsEmpty(sys->fifo) && sys->running)
+ if (vlc_fifo_IsEmpty(sys->fifo) && sys->running)
vlc_fifo_Wait(sys->fifo);
block = vlc_fifo_DequeueUnlocked(sys->fifo);
More information about the vlc-commits
mailing list