[MPlayer-dev-eng] [PATCH] Do not block mplayer at rtsp eof

Rich Felker dalias at aerifal.cx
Tue May 1 16:26:00 CEST 2007


On Tue, May 01, 2007 at 07:04:46AM -0700, Ross Finlayson wrote:
> At 1:10 PM +0200 5/1/07, Carl Eugen Hoyos wrote:
> >Current svn hangs on eof when playing rtsp streams (from a server that
> >supports trick play). Attached patch fixes this issue by quitting after
> >no packet has arrived for three seconds.
> 
> No, this is bad.  A RTSP client should quit only if it receives a 
> RTCP "BYE" packet, or if the RTSP connection closes.  (I.e., the 
> testing for "stream->eof" is OK, but the 3 second delay is not.)
> 
> For streams that have a known end point, the server will indicate 
> this, by including an end time in the 'time' ("t=") SDP attribute, 
> but will *not* send a RTCP "BYE" when it reaches the end of the 
> stream.  This allows the client to - if it wishes - seek backwards 
> and replay the stream (using RTSP).  (For 'live' streams, with no 
> predefined end point, the server will instead send a RTCP "BYE" if 
> the stream ends.)
> 
> (If a client *really* wants to quit after reaching the end of the 
> stream - i.e., without using its ability to seek backwards and replay 
> the stream - then it can, if it wishes, use the stream's known 'end 
> time' to figure this out.  This is what our "openRTSP" command-line 
> client does, for example.  For GUI clients, however, we really want 
> to retain the ability to seek backwards and replay the stream.)

Note that MPlayer's behavior is always to quit/go to next file when it
reaches the end of a file. It's not acceptable for RTSP to behave
differently. If you don't like this default, make an option to
override it for all stream types, but don't special-case RTSP...

Rich



More information about the MPlayer-dev-eng mailing list