[MPlayer-dev-eng] [BUG] playing from network

D Richard Felker III dalias at aerifal.cx
Fri Sep 6 02:58:27 CEST 2002


On Fri, Sep 06, 2002 at 01:46:29AM +0200, Arpi wrote:
> Hi,
> 
> > > Ok, fixed!
> > 
> > and is broken now badly
> > 
> > mplayer -vo null mms://213.163.39.177:1755/xBBStream2
> > 
> > prints nothing after 'Connecting to server 213.163.39.177:1755 ...'
> > but eats 10mb more memory per second, and in 10-20 seconds eat all available
> > memory and then eat swap and then crash the system... unless you kill it
> 
> ok with teh help of users, i got closer:
> 
> at asf_streaming.c:660:
> 
>                 do {
>                         i = read( fd, buffer, BUFFER_SIZE );
> printf("read: %d\n", i );
>                         if( i<0 ) {
>                                 perror("read");
>                                 http_free( http_hdr );
>                                 return -1;
>                         }
>                         http_response_append( http_hdr, buffer, i );
>                 } while( !http_is_header_entire( http_hdr ) );
> 
> that printf keeps printing 'read: 0', flooding tty so much that i cannot
> even stop with ctrl^c just kill from another tty.
> teh memory eating is probably caused by memory leak in http_response_append()
> or http_is_header_entire().
> 
> i've tried to change that if(i<0) to if(i<=0) so it goes further, but then
> it hangups in cache filling process at 0%.
> 
> i wondering what is causing that read() return 0?
> afaik read() only return 0 in nonblocking mode if no data, and at EOF.

-1 on no data, with EAGAIN. 0 means eof!

Rich




More information about the MPlayer-dev-eng mailing list