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

Luca Abeni lucabe72
Fri Nov 27 16:06:46 CET 2009


Ivo wrote:
[...]
> I dropped this hunk locally. Non-blocking mode is non-blocking, but it does 
> not behave entirely correctly. It should not check for -EAGAIN, but use 
> snd_pcm_status_get_avail upfront, before writing the frames.

Yes, I just ran some tests, and I verified that if the check is not performed
ALSA writes some bytes and snd_pcm_writei() returns a very small positive
value...


> If there's not 
> enough room, it should return -EGAIN, as there's no way to signal the 
> calling application that some frames were not written. But such fix belongs 
> in a separate patch IMHO.

I agree.


> So, I dropped this hunk and the rest is the same.  If it's ok to apply, I'll
> increase the micro number and update APIchanges in a separate commit.

Since nonblocking ALSA output is currently buggy, I am not sure if adding
AVFMT_HAS_NONBLOCK in alsa_muxer is a good idea or not. Maybe it can be added
in the future patch that fixes nonblocking alsa out?
But I have no strong opinions about this.
Apart from this issue, I now think it's fine. If Michael is ok with the patch,
I'd say commit it.


			Thanks,
				Luca



More information about the ffmpeg-devel mailing list