If an address/port was previously decided upon (ex: multicast in the
SDP), then use that instead of re-creating another one
Fixes https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/57
* 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,
else
flags |= GST_RTSP_ADDRESS_FLAG_IPV4;
- addr = gst_rtsp_address_pool_acquire_address (pool, flags, 2);
+ if (*server_addr_out)
+ addr = *server_addr_out;
+ else
+ addr = gst_rtsp_address_pool_acquire_address (pool, flags, 2);
if (addr == NULL)
goto no_address;