Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
George Kiagiadakis
gst-plugins-good
Commits
bf5a72a6
Commit
bf5a72a6
authored
Feb 28, 2016
by
Sebastian Dröge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtspsrc: Properly error out if binding the UDP sockets fails
udpsrc is not returning us a socket in that case.
parent
03d2ae15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
gst/rtsp/gstrtspsrc.c
gst/rtsp/gstrtspsrc.c
+14
-3
No files found.
gst/rtsp/gstrtspsrc.c
View file @
bf5a72a6
...
...
@@ -3545,6 +3545,9 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
/* configure socket, we give it the same UDP socket as the udpsrc for RTP
* so that NAT firewalls will open a hole for us */
g_object_get
(
G_OBJECT
(
stream
->
udpsrc
[
0
]),
"used-socket"
,
&
socket
,
NULL
);
if
(
!
socket
)
goto
no_socket
;
GST_DEBUG_OBJECT
(
src
,
"RTP UDP src has sock %p"
,
socket
);
/* configure socket and make sure udpsink does not close it when shutting
* down, it belongs to udpsrc after all. */
...
...
@@ -3600,6 +3603,9 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
* because some servers check the port number of where it sends RTCP to identify
* the RTCP packets it receives */
g_object_get
(
G_OBJECT
(
stream
->
udpsrc
[
1
]),
"used-socket"
,
&
socket
,
NULL
);
if
(
!
socket
)
goto
no_socket
;
GST_DEBUG_OBJECT
(
src
,
"RTCP UDP src has sock %p"
,
socket
);
/* configure socket and make sure udpsink does not close it when shutting
* down, it belongs to udpsrc after all. */
...
...
@@ -3637,17 +3643,22 @@ gst_rtspsrc_stream_configure_udp_sinks (GstRTSPSrc * src,
/* ERRORS */
no_destination:
{
GST_
DEBUG
_OBJECT
(
src
,
"no destination address specified"
);
GST_
ERROR
_OBJECT
(
src
,
"no destination address specified"
);
return
FALSE
;
}
no_sink_element:
{
GST_
DEBUG
_OBJECT
(
src
,
"no UDP sink element found"
);
GST_
ERROR
_OBJECT
(
src
,
"no UDP sink element found"
);
return
FALSE
;
}
no_fakesrc_element:
{
GST_DEBUG_OBJECT
(
src
,
"no fakesrc element found"
);
GST_ERROR_OBJECT
(
src
,
"no fakesrc element found"
);
return
FALSE
;
}
no_socket:
{
GST_ERROR_OBJECT
(
src
,
"failed to create socket"
);
return
FALSE
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment