Commit a48711fa authored by Edward Hervey's avatar Edward Hervey 🤘 Committed by Edward Hervey

rtsp-stream: Use cached address when allocating sockets

If an address/port was previously decided upon (ex: multicast in the
SDP), then use that instead of re-creating another one

Fixes gstreamer/gst-rtsp-server#57
parent ae32203c
......@@ -1076,7 +1076,8 @@ no_address:
* won't release the address from the pool.
* Returns: (nullable): the #GstRTSPAddress of @stream or %NULL when
* the address could be reserved. gst_rtsp_address_free() after usage.
* the address could not be reserved. gst_rtsp_address_free() after
* usage.
GstRTSPAddress *
gst_rtsp_stream_reserve_address (GstRTSPStream * stream,
......@@ -1448,6 +1449,9 @@ again:
if (*server_addr_out)
addr = *server_addr_out;
addr = gst_rtsp_address_pool_acquire_address (pool, flags, 2);
if (addr == NULL)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment