[FFmpeg-devel] [PATCH] lavf: AVFMT_HAS_NONBLOCK flag for (de)muxers

Ivo ivop
Sun Nov 29 23:46:58 CET 2009


On Friday 27 November 2009, 20:23:08, Michael Niedermayer wrote:
> On Fri, Nov 27, 2009 at 08:00:11PM +0100, Luca Abeni wrote:
> > I think we have no ALSA maintainer, so I was applying the standard
> > "fallback to Michael" thing ;-)
>
> well ask for volunteers and if you find none threaten with svn rm alsa
> if that still produces no volunteer maintainer, it probably means noone
> cares about alsa and it can saftely be removed.

Luca, didn't you write the alsa backend with Benoit? Or did you drop 
maintainership later?

> > Anyway, if you are ok with the "generic" (avformat.h) part of the patch
> > I think it's worth applying it (maybe waiting one day or two, to give
> > other people to possibility to comment).
>
> iam ok with the generic part, but i would suspect that at least
> av_interleaved_write_frame() needs changes to be able to recover from
> a EAGAIN without loosing packets

I looked at av_interleaved_write_frame and it passes -EGAIN on to the 
calling application. I have alsa fixed locally and it's ffmpeg.c that does 
this if alsa receives the packages too fast in non-blocking mode:

    ret= av_interleaved_write_frame(s, pkt);
    if(ret < 0){
        print_error("av_interleaved_write_frame()", ret);
        av_exit(1);
    }

Shouldn't the calling application act on -EAGAIN, wait a little and try 
av_interleaved_write_frame(s,pkt) again? Or will that result in duplicate 
packets? (the code is not entirely clear to me yet)

--Ivo



More information about the ffmpeg-devel mailing list