On Sun, May 1, 2011 at 16:04, Ronald S. Bultje <[email protected]> wrote:

> Hi,
>
> On Sun, May 1, 2011 at 3:35 AM, Luca Barbato <[email protected]> wrote:
> > On 5/1/11 9:54 AM, aviad rozenhek wrote:
> >>
> >> currently, av_open_input_file() opens protocols without the
> >> AVIO_FLAG_NONBLOCK flag.
> >> I suggest that av_open_input_file() respect the AVFMT_FLAG_NONBLOCK flag
> >> by
> >> calling avio_open() with AVIO_FLAG_NONBLOCK flag
> >> whenever AVFMT_FLAG_NONBLOCK  is set.
> >>
> >> specifically (from libavformat/utils.c) :
> >>
> >>     if (!fmt || !(fmt->flags&  AVFMT_NOFILE)) {
> >>         /* if no file needed do not try to open one */
> >> +       int flags = AVIO_FLAG_READ | (fmt->flags&  AVFMT_FLAG_NONBLOCK)?
> >> AVIO_FLAG_NONBLOCK : 0;
> >> -       if ((err=avio_open(&pb, filename, AVIO_FLAG_READ))<  0) {
> >> +       if ((err=avio_open(&pb, filename, flags))<  0) {
> >>             goto fail;
> >>         }
> >
> > I like the idea.
>
> We need a demuxer-supports-nonblock (or doesnotsupport-nonblock) flag
> so we can turn it off for the demuxers not supporting it.
>
>
doesn't retry_transfer_wrapper() already take care of this without requiring
explicit support in demuxers?

-- 
Aviad Rozenhek
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to