[FFmpeg-devel] [PATCH] UDP fixes join multicast group on Darwin arch

Sébastien Zwickert szwickert
Fri Apr 17 16:25:42 CEST 2009


I've tried to play or capture a multicast stream over UDP on Mac OS  
10.5.6, but it didn't work.

The following commands hang and give any output :
~ ffplay udp://
~ ffmpeg -i udp:// out.mpg

I found that udp_join_multicast_group() in libavformat/udp.c is broken  
because IP_ADD_MEMBERSHIP and ip_mreq struct aren't defined on Darwin  
Kernel Version 9.6.0 architecture.
I've read this archive http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2008-August/051136.html 
  and i've added the _DARWIN_C_SOURCE definition at the top of the  
udp.c file.
After this change the multicast stream works fine for playback with  
ffplay and capturing with ffmpeg.

The patch in attachment has been generated with svn diff on ffmpeg  
trunk (revision 18555).

-------------- next part --------------
A non-text attachment was scrubbed...
Name: udp_multicast_darwin.patch
Type: application/octet-stream
Size: 438 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090417/d62bfb74/attachment.obj>
-------------- next part --------------


Sebastien Zwickert

More information about the ffmpeg-devel mailing list