[MPlayer-advusers] dumpstream: bails out on retriable errors

Rich Felker dalias at aerifal.cx
Thu Mar 6 06:06:48 CET 2008


On Wed, Mar 05, 2008 at 07:59:42PM -0800, klchxbec wrote:
> With RC2, -dumpstream often fails for mms with :
> 
> read error:: Resource temporarily unavailable 
> 
> Or if I suspend/resume
> 
> read error:: Interrupted system call
> 
> I fixed this by changing stream/asf_mmst_streaming.c, 
> 
> static int get_data (int s, char *buf, size_t count)
> {
>   ssize_t  len;
>   size_t total = 0;
> 
>   while (total < count) {
> 
>     len = recv (s, &buf[total], count-total, 0);
> 
>     if (len<=0) {
> +      if (errno == EAGAIN || errno == EINTR)
> +        continue;

What OS is this? EAGAIN is always an invalid value for errno except
when the file descriptor is set to nonblocking mode. EINTR is invalid
unless a signal handler is installed and the corresponding signal
occurred. Neither of these should be the case for MPlayer..

BTW, posting a bug report without info on your OS is hardly the level
of bug-reporting that merits using advusers...

Rich



More information about the MPlayer-advusers mailing list