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

Luca Abeni lucabe72
Wed Mar 10 23:26:35 CET 2010


On 10/03/10 23:18, Ronald S. Bultje wrote:
> Hi,
>
> On Tue, Mar 9, 2010 at 9:47 AM, Luca Abeni<lucabe72 at email.it>  wrote:
>> 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,
>
> Eehw, ugly.

Well, we clearly have different opinions on what is ugly :)
What's happening here is that the RTSP muxer wants to create an SDP 
using a different destination address respect to what is specified in 
the AVFormatContext (using the numeric IP instead of the symbolic name). 
So, if the destination is different then creating a different 
AVFormatContext makes sense to me.
In my opinion the ugly thing is using an AVFormatContext that does not 
correctly describe the RTP stream...


>> 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).
>
> Hm.. In a way, that would be an application bug anyway. How about an
> internal function, e.g. ff_sdp_create2(), that is called both by
> avf_sdp_create() as well as RTSP?

To me, this still looks like the wrong thing to do: the context(s) 
passed to the sdp_create() (or create2) function should describe the RTP 
streams. I do not see a reason for passing an additional parameter for 
the destination (if we want a different destination, let's pass an 
AVFormatContext containig a different destination).


			Luca



More information about the ffmpeg-devel mailing list