[FFmpeg-devel] [PATCH 3/3] lavd/openal: return EAGAIN if no samples are available

Nicolas George george at nsup.org
Fri Sep 30 22:40:17 EEST 2016


Le nonidi 9 vendémiaire, an CCXXV, Marton Balint a écrit :
> Alsa dev and v4l2 seem to work this way regardless if non blocking mode is
> set or not,

After a quick glance, no, they do not, at least provided the kernel and
system libraries keep the same promise (which, AFAIK, they do).

>	      and ffmpeg.c also waits if it encounters AVERROR(EAGAIN) in
> av_read_frame.

It should not have to, but for a long time the demuxers were opened in
non-blocking mode, I suppose the code was not updated when it was changed.

>		 So AVERROR(EAGAIN) return value seems to be consistent with
> existing code, which assumes that if EAGAIN is returned from av_read_frame,
> wait a bit.
> 
> If what you wrote is the way to move forward, then at least send a
> documentation patch, to establish this av_read_frame return value behaviour.

I will consider doing that when time permit. But the behaviour is directly
copied from the Unix behaviour.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160930/6e371065/attachment.sig>


More information about the ffmpeg-devel mailing list