Permalink
Browse files

udpsrc: fix valgrind warning

  • Loading branch information...
1 parent b744ad0 commit 86cd5bd7f2b0fe5aa594a94536dee0bd7d715798 Tim-Philipp Müller committed Dec 27, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 gst/udp/gstudpsrc.c
View
@@ -491,7 +491,8 @@ gst_udpsrc_create (GstPushSrc * psrc, GstBuffer ** buf)
if (G_UNLIKELY (!readsize)) {
/* try to read a packet (and it will be ignored),
* in case a packet with no data arrived */
- recvfrom (udpsrc->sock.fd, (char *)&slen, 0, 0, &sa.sa, &slen);
+ slen = sizeof (sa);
+ recvfrom (udpsrc->sock.fd, (char *) &slen, 0, 0, &sa.sa, &slen);
/* clear any error, in case a poll error occurred */
clear_error (udpsrc);

0 comments on commit 86cd5bd

Please sign in to comment.