Using ccRTP to receive DVB data I have come across the following bug:
When opening a RTPSession on a multicast address, the underlying socket binds to address 0.0.0.0 and issues a correct IGMP request.
IMHO this is an incorrect behaviour as the app receives any traffic sent to the same port even though it is sent to different addresses.
I have seen that this behaviour was introduced due to ccRTP not correctly sending out IGMP joins
(please see the following post: http://osdir.com/ml/gnu.ccrtp.devel/2003-07/msg00000.html\).
This "fix" has introduced this bug.
When binding to the multicast address, in my case (Ubuntu 8.10) the IGMP Joins are not sent out correctly, because commoncpp uses imr_ifindex instead of imr_interface.s_addr=INADDR_ANY for the IP_ADD_MEMBERSHIP call. (see commoncpp2-1.7.0/src/socket.cpp lines 1544-1574 - lines 1544-1559 are executed).
Recompiling the library with the __GNU__ flag for example, makes it work just fine.
I guess the various flags in line 1544 are for portability and I'm wondering why for a regular GNU/Linux system like Ubuntu 8.10 this is not the default behaviour - I hope that someone who knows this better can shed some light on it.
Once this issue is resolved, libccRTP can bind the socket to the correct multicast address and everything works just fine.
I attach the patch for ccrtp-1.7.0/src/ccrtp/rtp.h