[FFmpeg-devel] [PATCH] Use the actual RTSP peer IP for RTP sessions

Martin Storsjö martin
Mon Mar 8 20:09:32 CET 2010


On Mon, 8 Mar 2010, Ronald S. Bultje wrote:

> On Mon, Mar 8, 2010 at 11:53 AM, Martin Storsj? <martin at martin.st> wrote:
> > On Mon, 8 Mar 2010, Ronald S. Bultje wrote:
> >> On Mon, Mar 8, 2010 at 5:08 AM, Martin Storsj? <martin at martin.st> wrote:
> >> > The IP address is also present in the SDP, so the
> >> > AVFormatContext->filename field must be temporarily changed to contain an
> >> > URL with the numerical IP, but later changed back to the originally
> >> > requested url. This feels a bit messy, though.
> >>
> >> Better not change that, imo. Can you make it a local buffer? Also, we
> >> already have RTSPState->filename (or so) as a copy (for control:
> >> purposes), maybe you should use that, see the comments in the code for
> >> that.
> >
> > No, unfortunately, I can't give the url directly to avf_sdp_create, it
> > only reads the AVFormatContext->filename field. Unless we improve it, of
> > course. :-)
> 
> Improve it, indeed.

Ok, I'll see what I can do.

> > Or did you mean that I should use the RTSPState->control_uri field as temp
> > location for the proper URL? Or even switch all usage of
> > AVFormatContext->filename to use RTSPState->control_uri instead, so it
> > wouldn't matter what we set to AVFormatContext->filename?
> 
> RTSP already does only use control_uri, where relevant at least. We
> should never modify AVFormatContext->anything unless it is documented
> as a demuxer-set value.

It still uses s->filename in a few places, but the attached patch takes 
care of that.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rtsp-control-uri.patch
Type: text/x-diff
Size: 3103 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100308/5ca9fe4f/attachment.patch>



More information about the ffmpeg-devel mailing list