After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595978 - [udpsrc] failed to play a multicast stream
[udpsrc] failed to play a multicast stream
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Windows
: Normal normal
: 0.10.24
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-09-22 18:02 UTC by Julien Isorce
Modified: 2010-06-18 15:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for multicast support on windows builds (1.77 KB, patch)
2010-04-23 15:54 UTC, Keith Nicholson
none Details | Review

Description Julien Isorce 2009-09-22 18:02:19 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
Comment 1 Wim Taymans 2010-03-10 10:39:46 UTC
works on linux with current git. Is this on windows?
Comment 2 Keith Nicholson 2010-04-23 15:52:45 UTC
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'.
Comment 3 Keith Nicholson 2010-04-23 15:54:55 UTC
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.
Comment 4 Wim Taymans 2010-06-18 14:57:18 UTC
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