[vlc-commits] udp: fix potential deadlock at exit
Rémi Denis-Courmont
git at videolan.org
Wed Feb 25 17:38:37 CET 2015
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Feb 24 23:12:28 2015 +0200| [613ea43a83ed745a9dd58ebce89607b98dbe894c] | committer: Rémi Denis-Courmont
udp: fix potential deadlock at exit
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=613ea43a83ed745a9dd58ebce89607b98dbe894c
---
modules/access/udp.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/modules/access/udp.c b/modules/access/udp.c
index 76f68a2..1a17629 100644
--- a/modules/access/udp.c
+++ b/modules/access/udp.c
@@ -232,8 +232,14 @@ static int Control( access_t *p_access, int i_query, va_list args )
static block_t *BlockUDP( access_t *p_access )
{
access_sys_t *sys = p_access->p_sys;
+ block_t *block;
- return block_FifoGet( sys->fifo );
+ if( p_access->info.b_eof )
+ return NULL;
+
+ block = block_FifoGet( sys->fifo );
+ p_access->info.b_eof = block == NULL;
+ return block;
}
/*****************************************************************************
More information about the vlc-commits
mailing list