[FFmpeg-devel] [patch] fix problem receiving udp multicast

Deti Fliegl deti at fliegl.de
Wed Nov 20 10:22:49 CET 2013

On 20.11.13 08:01, Reimar Döffinger wrote:
> On 19.11.2013, at 23:29, Deti Fliegl <deti at fliegl.de> wrote:
>> On 19.11.13 22:50, Reimar Döffinger wrote:
>>> On Tue, Nov 19, 2013 at 10:41:10PM +0100, Deti Fliegl wrote:
>>>> Hi there,
>>>> I am using the trunk version of ffmpeg. When receiving udp multicast
>>> Why is AVIO_FLAG_WRITE set when _receiving_? That sounds like the
>>> real bug to me...
>> ... because RTP works in both directions. You receive on one port and on
>> the second you receive and send RTCP data.
> But you wrote
>> This causes massively scrambled data containing every stream on the
> network seen by libavformat.
> And that shouldn't happen if only the rtcp port is affected as I understand it, since the actual stream data is on a different port.
The rtp code opens two UDP sockets. IMHO the second one has always to be
read-/writeable and the first one needs to be opened readable, writable
or both. In rtp_open the flags argument gets passed through until the
both ffurl_open functions. So the only way to properly open a rtp stream
for sending or receiving is with flags AVIO_FLAG_READ_WRITE. My
conclusion is that it breaks less other code when we just apply my
minimal patch then changing the rtp code. What do you think?


More information about the ffmpeg-devel mailing list