[MPlayer-dev-eng] [PATCH] fix premature end of stream download

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Mar 24 20:14:32 CET 2012


On Fri, Mar 23, 2012 at 04:01:56PM -0700, trevor-b at ovi.com wrote:
> correcting my previous email ...
> 
> >   recv is not allowed to return EAGAIN
> yes, you are correct, len is not set to EAGAIN - errno is
> 
> maybe the while statement in the patch should be ...
> +    while( len <= 0 && errno == EAGAIN && nr_tries-- > 0 );
> 
> I'll do some more tests and post again in a couple of days time.

Possibly, though errno is not thread-safe, so it might be better
to just skip checking it.
On the other hand, then it is EAGAIN it might be better to
retry regardless who often we retried before.
Anyway it might also be a good idea to check the async_quite_request
variable inside such a loop.
However since your non-working patch "fixed" the issue there is the
question if there was any real issue with the MPlayer code or if the
server/network connection was just having issues that nothing could
have avoided...


More information about the MPlayer-dev-eng mailing list