]> git.sesse.net Git - vlc/commitdiff
file out: print I/O error to log and fix error handling
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 29 Nov 2012 15:37:37 +0000 (17:37 +0200)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 29 Nov 2012 15:38:18 +0000 (17:38 +0200)
modules/access_output/file.c

index 5b2ec2928d5379e3e90fb8256760c6e1041f2bc0..07ecaafe1f4517fd0a4f8e280d03b1079a7255c2 100644 (file)
@@ -274,11 +274,12 @@ static ssize_t Write( sout_access_out_t *p_access, block_t *p_buffer )
     {
         ssize_t val = write ((intptr_t)p_access->p_sys,
                              p_buffer->p_buffer, p_buffer->i_buffer);
-        if (val == -1)
+        if (val <= 0)
         {
             if (errno == EINTR)
                 continue;
             block_ChainRelease (p_buffer);
+            msg_Err( p_access, "cannot write: %m" );
             return -1;
         }