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

Martin Storsjö martin
Tue Mar 9 16:42:32 CET 2010


On Tue, 9 Mar 2010, Luca Abeni wrote:

> Martin Storsj? wrote:
>
> > In the RTSP muxer case, we don't have the RTP muxers available at that point
> > yet. First we create an SDP that we announce, then we do the setup of each
> > individual stream, and create each RTP muxer at that point.
> 
> Ah, ok. Now I remember :)

Ok, good. :-)

> I see. Yes, this way of doing things opens the possibility to have
> RTP AVFormatContexts which are not fully initialised. And this makes
> the code more complex, increasing the number of "if"s in the error paths.
> But, on the other hand, I think this way of doing things is conceptually
> more correct (we create the SDP based on the real RTP contexts).

Yes, conceptually, it would be more correct to do it that way, but with 
the current architecture, it's a bit complicated. :-)

> Anyway, if you do not like it let's see if we can find an alternative
> compromise. What about this: creating the SDP from an RTSP context (as
> you are doing now), but instead of using the original AVFormatContext
> you can create a copy (and modify the filename in the copy).
> This looks like a good compromise to me, and should address the problem
> in a clean way without opening the door to SDPs that have different
> destination addresses respect to the RTP contexts (yes, I know this is
> not what you are doing here, but if we modify the avf_sdp_create()
> interface in this way we allow this kind of incorrect usage).

That's acceptable for me. Example of this solution attached.

// Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: custom-sdp-url.patch
Type: text/x-diff
Size: 1709 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100309/43223d6f/attachment.patch>



More information about the ffmpeg-devel mailing list