mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 21:18:52 +00:00
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 https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/issues/57
This commit is contained in:
parent
ae32203cb0
commit
a48711fa9d
1 changed files with 6 additions and 2 deletions
|
@ -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,7 +1449,10 @@ again:
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue