[MPlayer-dev-eng] [PATCH] Fw: rtsp fixes (buffer size, redirections)

Roberto Togni r_togni at libero.it
Wed May 28 23:01:06 CEST 2003

Resending with a subscribed address...

On 2003.05.28 13:19 Sascha Sommer wrote:
> Got a new message from yepyep.
> Can someone please look at thes rtsp fixes. Maybe also inform xine
> people to
> make further syncing easier.
Looks ok, i'm gonna applying it.
The cleanest solution would be dropping rtsp_session.c at all, and do 
all the connection and server checking in demuxer.c, as it's done for 
http. I'll do it for G2, putting everything now in rtsp_session.c into 
a realrtsp stream module.

Redirection works ok in xine, i broke it while porting the code to 

If yepyep is not on the list, please forward him my answer.

> Sascha
> ----- Original Message -----
> From: "flo/yepyep" <flodt8 at yahoo.de>
> To: <saschasommer at freenet.de>
> Sent: Wednesday, May 28, 2003 12:38 PM
> Subject: rtsp fixes (buffer size, redirections)
> > hi,
> >
> > i figured out how to make that viva stream work yesterday, attached
> > is a patch. rtsp://rd01.t-bn.de/live/viva/viva1tv_live_adsl.rm
> > returns a redirection, which could not be handled before. it said
> > "FIXME" in the source actually :)
> >
> > anyhow, i made this quick fix that tells the caller in network.c to
> > connect to the other server when a redirection is found. i hope it's
That's ok.

> > okay that way. this patch also fixes the problem with the buffers
> > being too small in sdpplin.c and the resulting crashes and
> > non-working streams. i think 255 should be a decent size for them.
It's not required here (not in MPlayer nor in xine).
Can you explain when it's required? xbuffers (like the original 
xine_buffers) should expand the allocated memory when you try to copy 
into them something that's bigger than current buffer (if used 
correctly). Maybe there's a bug in my xbuffer implementation or in the 
original xine_buffer usage.

> >
> > there is still one thing that's not very beautiful: when it outputs
> > "Connected to server: blah ..." (from open.c) it still prints the
> > hostname part of the first server. but i concider that to be just a
> > cosmetic thing.
Can't reproduce. It's redirected to a numeric address, and it's printed 
correctly. Please give sample.

> >
> > if you apply this patch and plan to use it on windows, also change
> > the close(fd); in realrtsp_streaming_start (somewhere in network.c)
> > to closesocket(fd);, or more correct to "#ifndef HAVE_WINSOCK2 /
> > close(fd) / #else / closesocket(fd) / #endif" (/ = line breaks) - i
> > will put this fix into the mingwnetwork patch later, didn't make
> much
> > sense to me putting that ifdef in before the rest is there too.
Can somebody take care of this? Or tell me it's ok and i'll do it, as i 
can't test it on windows.

> >
> > demux_real.c still prints that "!!!! BUG !! len=-1397 !!!!" message
> > (with changing values for len) for this stream, but that's obviously
> > a completely different bug. maybe the maintainer of this file knows
> > why it might happen?
Sorry, can't help with this. Can someone have a look at it?

> >
> > feel free to forward this to the mailing list :)
> >
> > flo/yepyep
> >

More information about the MPlayer-dev-eng mailing list