[vlc-devel] commit: Decomp: catch 0 write ( Rémi Denis-Courmont )
git version control
git at videolan.org
Mon Oct 13 18:02:20 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Mon Oct 13 19:00:31 2008 +0300| [0653497b2a7e44b97f52dc486ebe10d72d6eeee9] | committer: Rémi Denis-Courmont
Decomp: catch 0 write
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0653497b2a7e44b97f52dc486ebe10d72d6eeee9
---
modules/demux/decomp.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/modules/demux/decomp.c b/modules/demux/decomp.c
index 4734e55..82ae4bc 100644
--- a/modules/demux/decomp.c
+++ b/modules/demux/decomp.c
@@ -116,8 +116,10 @@ static void *Thread (void *data)
#else
j = writev (fd, iov, 1);
#endif
- if (j == -1)
+ if (j <= 0)
{
+ if (j == 0)
+ errno = EPIPE;
msg_Err (demux, "cannot write data (%m)");
error = true;
break;
More information about the vlc-devel
mailing list