[Libav-user] Opening an UDP stream for reading :usingavformat_open_input()?

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Apr 6 10:31:53 CEST 2012

2012/4/6 huanggh0108 <huanggh0108 at sina.com>:
>  >> Of course.
>>> If the parametric filename like "udp://?localport=7899", it will receive
>>> data from port 7899.
>>Wrong. udp:// will do that. Maybe ip part can be
>>eliminated, haven't try it.
>>localport option is used on udp output, not input.
> Please don't jump to conclusions when you haven't try it. the ffmpeg source
> code will tell us all. There are several forms(including yours) to achieve
> his aim.
> libavformat/udp.c:
> static int udp_open(URLContext *h, const char *uri, int flags);

if ((s->is_multicast || !s->local_port) && (h->flags & AVIO_FLAG_READ))
        s->local_port = port;

Indeed, i was wrong.
My apologies.

Andrey Utkin

More information about the Libav-user mailing list