Fail permanently on fatal file I/O error
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 28 Sep 2008 15:45:59 +0000 (18:45 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sun, 28 Sep 2008 15:45:59 +0000 (18:45 +0300)
This fixes a busy loop.

modules/access/file.c

index cdf51ac..b2b2b23 100644 (file)
@@ -245,6 +245,7 @@ static ssize_t Read( access_t *p_access, uint8_t *p_buffer, size_t i_len )
                 msg_Err (p_access, "read failed (%m)");
                 intf_UserFatal (p_access, false, _("File reading failed"),
                                 _("VLC could not read the file."));
+                return 0;
         }
     }
     else if( i_ret > 0 )