diff options
-rw-r--r-- | gst/udp/gstudpsink.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gst/udp/gstudpsink.c b/gst/udp/gstudpsink.c index 6701a1d9..f4b97de2 100644 --- a/gst/udp/gstudpsink.c +++ b/gst/udp/gstudpsink.c @@ -382,8 +382,10 @@ gst_udpsink_init_send (GstUDPSink *sink) } /* we dont need to lookup for localhost */ - else if (strcmp (sink->host, UDP_DEFAULT_HOST) == 0) { - sink->theiraddr.sin_addr = *((struct in_addr *) sink->host); + else if (strcmp (sink->host, UDP_DEFAULT_HOST) == 0 && + inet_aton ("127.0.0.1", &addr)) { + sink->theiraddr.sin_addr = + *((struct in_addr *) g_memdup (&addr, sizeof (addr))); } /* if its a hostname */ |