[FFmpeg-devel] [PATCH] udp multicast address selection

Michael Niedermayer michaelni
Tue Aug 7 18:36:54 CEST 2007


On Tue, Aug 07, 2007 at 04:29:41PM +0200, Thijs Vermeir wrote:
> Hi,
> 
> Situation:
> -> looking at multicast stream on 226.255.0.5:3000 with ffmpeg or other program
> -> start to look at another multicast stream with ffmpeg (226.255.0.10:3000)
> 
> Problem:
> ffmpeg takes all data from port 3000 and does not filter on the
> multicast address.
> 
> This patch should fix this problem.
> 
> Gr,
> Thijs

> Index: libavformat/udp.c
> ===================================================================
> --- libavformat/udp.c	(revision 9980)
> +++ libavformat/udp.c	(working copy)
> @@ -327,12 +327,13 @@
>          goto fail;
>  
>      my_addr.sin_family = AF_INET;
> -    my_addr.sin_addr.s_addr = htonl (INADDR_ANY);
>      if (s->is_multicast && !(h->flags & URL_WRONLY)) {
>          /* special case: the bind must be done on the multicast address port */
>          my_addr.sin_port = s->dest_addr.sin_port;
> +        my_addr.sin_addr.s_addr = inet_addr(hostname);

inet_addr is obsolete and it converts numbers and dots while hostname
here AFAICS can be anything no need for it to be numbers and dots

also we need a proper testcase
a proper test case is a series of instructions in your mail which i can copy
and paste in a terminal to test that it does not work before your patch and
when done with your patch applied does work!

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070807/1f7bf243/attachment.pgp>



More information about the ffmpeg-devel mailing list