GNOME Bugzilla – Bug 595978
[udpsrc] failed to play a multicast stream
Last modified: 2010-06-18 15:05:38 UTC
* Steps to Reproduce: gst-launch-0.10 udpsrc uri=udp://224.0.0.1:1234 ! fakesink * Actual Results: 0:00:00.125000000 3256 00332790 DEBUG udpsrc gstudpsrc.c:611:gst_udpsrc_update_uri:<udpsrc0> updated uri to udp://224.0.0.1:1234 Setting pipeline to PAUSED ... 0:00:00.125000000 3256 00332790 DEBUG udpsrc gstudpsrc.c:804:gst_udpsrc_start:<udpsrc0> allocating socket for 224.0.0.1:1234 0:00:00.140625000 3256 00332790 DEBUG udpsrc gstudpsrc.c:821:gst_udpsrc_start:<udpsrc0> binding on port 1234 0:00:00.140625000 3256 00332790 WARN udpsrc gstudpsrc.c:940:gst_udpsrc_start:<udpsrc0> error: bind failed -1: No error (0) ERROR: Pipeline doesn't want to pause. ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Could not get/set settings from/on resource. Additional debug info: ..\..\..\Source\gst-plugins-good\gst\udp\gstudpsrc.c(940): gst_udpsrc_start (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: bind failed -1: No error (0) Setting pipeline to NULL ... Freeing pipeline ... * Expected Results: Playing state reached. * Build Date & Platform: git HEAD (and same result before ipv6 add-ons) * Additional Information: Same result with gst-launch-0.10 udpsrc multicast-group=224.0.0.1 port=1234 ! fakesink
works on linux with current git. Is this on windows?
Found the same problem with udpsrc, it only seems to be an issue with windows. The bind is failing when the source address is a multicast group, due to (probably) some anomaly with the windows stack. The generally accepted solution under windows is that the bind address should be set to INADDR_ANY. I have attached a proposed patch that fixes up the bind address for windows builds when a multicast group has been specified. Note that I've also had to stop the getsockname from being called for multicast addresses otherwise the INADDR_ANY bound to the socket is read back, when we really want to keep hold of the multicast group for the subsequent 'join'.
Created attachment 159444 [details] [review] Patch for multicast support on windows builds On windows builds, sets source address for bind to INADDR_ANY, while maintaining the original multicast group address for subsequent join.
commit 0773eed9608ae4a99635e23d8c15b88821798acc Author: Keith Nicholson <keith.nicholson at ultra-ccs.com> Date: Fri Jun 18 16:49:08 2010 +0200 udpsrc: fix multicast support on windows builds On windows builds, sets source address for bind to INADDR_ANY, while maintaining the original multicast group address for subsequent join. Fixes #595978