[libav-api] question about non-blocking protocols

Ronald S. Bultje rsbultje at gmail.com
Sun May 1 13:04:43 CEST 2011


On Sun, May 1, 2011 at 3:32 AM, Luca Barbato <lu_zero at gentoo.org> wrote:
> On 4/30/11 8:53 PM, aviad rozenhek wrote:
>> thanks for your suggestion,
>> I have found what I believe to be a cleaner approach, your feedback
>> appreciated.
>> const char* url = "udp://localhost?localport=1234";
>> // pre-allocate the AVFormatContext and set the non block flag
>>         AVFormatContext* ctx = avformat_alloc_context();
>> ctx->flags |= AVFMT_FLAG_NONBLOCK;
> AVFMT_FLAG_NONBLOCK doesn't seem to forward to the avio layer but seems just
> used in avdevice.
> Probably might have sense doing that though.

We need flags in libavformat whether a demuxer handles NONBLOCK yes or
no. Most of them don't and will fail.


More information about the libav-api mailing list