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

Luca Abeni lucabe72
Wed Mar 10 22:42:19 CET 2010


Hi Martin,

On 09/03/10 16:42, Martin Storsj? wrote:
[...]
>> 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.

Looks like we found the good compromise :)
The patch looks good to me.


			Thanks,
				Luca



More information about the ffmpeg-devel mailing list