Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marc-André Lureau
gst-plugins-good
Commits
40bc0400
Commit
40bc0400
authored
Feb 25, 2009
by
Wim Taymans
Browse files
udpsrc: fix compilation
Fix compilation on systems MSG_ERRQUEUE and IP_RECVERR.
parent
1a2bd6c6
Changes
1
Show whitespace changes
Inline
Side-by-side
gst/udp/gstudpsrc.c
View file @
40bc0400
...
@@ -361,6 +361,7 @@ gst_udpsrc_getcaps (GstBaseSrc * src)
...
@@ -361,6 +361,7 @@ gst_udpsrc_getcaps (GstBaseSrc * src)
static
void
static
void
clear_error
(
GstUDPSrc
*
udpsrc
)
clear_error
(
GstUDPSrc
*
udpsrc
)
{
{
#if defined (MSG_ERRQUEUE)
struct
msghdr
cmsg
;
struct
msghdr
cmsg
;
char
cbuf
[
128
];
char
cbuf
[
128
];
char
msgbuf
[
CMSG_SPACE
(
128
)];
char
msgbuf
[
CMSG_SPACE
(
128
)];
...
@@ -384,6 +385,7 @@ clear_error (GstUDPSrc * udpsrc)
...
@@ -384,6 +385,7 @@ clear_error (GstUDPSrc * udpsrc)
cmsg
.
msg_controllen
=
sizeof
(
msgbuf
);
cmsg
.
msg_controllen
=
sizeof
(
msgbuf
);
recvmsg
(
udpsrc
->
sock
.
fd
,
&
cmsg
,
MSG_ERRQUEUE
);
recvmsg
(
udpsrc
->
sock
.
fd
,
&
cmsg
,
MSG_ERRQUEUE
);
#endif
}
}
static
GstFlowReturn
static
GstFlowReturn
...
@@ -858,12 +860,14 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
...
@@ -858,12 +860,14 @@ gst_udpsrc_start (GstBaseSrc * bsrc)
/* Accept ERRQUEUE to get and flush icmp errors */
/* Accept ERRQUEUE to get and flush icmp errors */
err_val
=
1
;
err_val
=
1
;
#if defined (IP_RECVERR)
if
((
ret
=
setsockopt
(
src
->
sock
.
fd
,
IPPROTO_IP
,
IP_RECVERR
,
&
err_val
,
if
((
ret
=
setsockopt
(
src
->
sock
.
fd
,
IPPROTO_IP
,
IP_RECVERR
,
&
err_val
,
sizeof
(
err_val
)))
<
0
)
{
sizeof
(
err_val
)))
<
0
)
{
GST_ELEMENT_WARNING
(
src
,
RESOURCE
,
SETTINGS
,
(
NULL
),
GST_ELEMENT_WARNING
(
src
,
RESOURCE
,
SETTINGS
,
(
NULL
),
(
"could not configure socket for IP_RECVERR %d: %s (%d)"
,
ret
,
(
"could not configure socket for IP_RECVERR %d: %s (%d)"
,
ret
,
g_strerror
(
errno
),
errno
));
g_strerror
(
errno
),
errno
));
}
}
#endif
if
(
src
->
auto_multicast
&&
gst_udp_is_multicast
(
&
src
->
myaddr
))
{
if
(
src
->
auto_multicast
&&
gst_udp_is_multicast
(
&
src
->
myaddr
))
{
GST_DEBUG_OBJECT
(
src
,
"joining multicast group %s"
,
src
->
multi_group
);
GST_DEBUG_OBJECT
(
src
,
"joining multicast group %s"
,
src
->
multi_group
);
...
...
Write
Preview
Supports
Markdown
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