Commit e95a471c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Decomp: partially fix error handling

parent fab9038a
...@@ -81,10 +81,11 @@ static void *Thread (void *data) ...@@ -81,10 +81,11 @@ static void *Thread (void *data)
demux_t *demux = data; demux_t *demux = data;
demux_sys_t *p_sys = demux->p_sys; demux_sys_t *p_sys = demux->p_sys;
int fd = p_sys->write_fd; int fd = p_sys->write_fd;
bool error = false;
vlc_cleanup_push (cleanup_fd, (void *)(intptr_t)fd); vlc_cleanup_push (cleanup_fd, (void *)(intptr_t)fd);
for (;;) do
{ {
#ifdef __linux__ #ifdef __linux__
/* TODO: mmap() + vmsplice() */ /* TODO: mmap() + vmsplice() */
...@@ -104,10 +105,12 @@ static void *Thread (void *data) ...@@ -104,10 +105,12 @@ static void *Thread (void *data)
if (j == -1) if (j == -1)
{ {
msg_Err (demux, "cannot write data (%m)"); msg_Err (demux, "cannot write data (%m)");
error = true;
break; break;
} }
} }
} }
while (!error);
vlc_cleanup_run (); /* close(fd) */ vlc_cleanup_run (); /* close(fd) */
return NULL; return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment