[FFmpeg-devel] [PATCH] Make RTP work with IPv6 enabled

Luca Abeni lucabe72
Mon Oct 29 12:18:19 CET 2007


Hi Ronald,

I did not read emails during the weekend, and I am slowly starting
to look at my inbox...

Ronald S. Bultje wrote:
[...]
> I read your proposed patch (after noticing +/- 5 stale ffplay processes :-)
> ) in another thread and was able to get ffplay going w/o CONFIG_IPV6 again,
> so that part is solved now.

Ok, good. I'll try to apply that patch soon ;-)


> However, even with the patches in recent
> threads, CONFIG_IPV6 doesn't work with udp. Set up is correct, the bind()
> succeeds but the sendto() in udp_write() fails completely unexpectedly with
> EINVAL, which isn't even documented in its manpage.

The only possibility I can guess is that s->dest_addr or s->dest_addr_len
is not set properly.

Just to be 100% sure that I understand correctly: this happens when you compile
without "--disable-ipv6", even if you try to stream to IPv4 addresses, right?


> If I split the sendto() into a separate connect() in udp_open() followed by
> send() in udp_write(), the whole thing works as expected

This is... Scary :(
I cannot imagine anything that can cause such a behaviour.
In the connect(), you use the same "s->dest_addr" and "s->dest_addr_len" used
in sendto(), right? Can you check with an av_log() that the used values are
the same, just to be 100% sure?


> Best way may be to re-arrange udp.c a bit to first set up the local part in
> udp_open() and then call connect() in set_remote_url() and send() / recv()
> instead of sendto() / recvfrom() in udp_read/write(), or is that a bad idea?

I do not know... But I do not feel confident with bugs going away without reasons...
Before changing the code, I'd like to understand what's going on :)


> (I still don't know what the bug is, but I suppose sendto() is just broken
> on macs (?)...)

That would be a big bug; I think someone should have noticed it before...
Maybe there are some MacOS forums where we can find more information about it?
Any other MacOS users on this list?


				Luca




More information about the ffmpeg-devel mailing list