[vlc-devel] commit: Decomp: partially fix error handling ( Rémi Denis-Courmont )
git version control
git at videolan.org
Sat Oct 11 19:36:40 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Sat Oct 11 20:07:01 2008 +0300| [e95a471c617ffd3ee00133c29b7878e3069f210a] | committer: Rémi Denis-Courmont
Decomp: partially fix error handling
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e95a471c617ffd3ee00133c29b7878e3069f210a
---
modules/demux/decomp.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/modules/demux/decomp.c b/modules/demux/decomp.c
index a1929f2..74b9eac 100644
--- a/modules/demux/decomp.c
+++ b/modules/demux/decomp.c
@@ -81,10 +81,11 @@ static void *Thread (void *data)
demux_t *demux = data;
demux_sys_t *p_sys = demux->p_sys;
int fd = p_sys->write_fd;
+ bool error = false;
vlc_cleanup_push (cleanup_fd, (void *)(intptr_t)fd);
- for (;;)
+ do
{
#ifdef __linux__
/* TODO: mmap() + vmsplice() */
@@ -104,10 +105,12 @@ static void *Thread (void *data)
if (j == -1)
{
msg_Err (demux, "cannot write data (%m)");
+ error = true;
break;
}
}
}
+ while (!error);
vlc_cleanup_run (); /* close(fd) */
return NULL;
More information about the vlc-devel
mailing list