[FFmpeg-devel] [PATCH] handle EAGAIN case in ffmpeg.c

Luca Abeni lucabe72
Wed Sep 12 12:18:03 CEST 2007


Hi Benoit,

Benoit Fouet wrote:
> here is a patch to $subj
> 
> what i'm trying to do is having v4l2 working

Unless something broke in the last two or three weeks, v4l2 should be 
already working... What's the problem you are seeing?
(I remember v4l2.c had problems with some v4l2 drivers returning 
timestamps always equal to 0... But that's a bug in the driver, not in 
ffmpeg)

I'll test it this night with latest svn, just to check if something 
strange happened in the last weeks...

> this raises a question to me: how can we wait for the driver to give us
> a frame. I think we should wait somewhere, depending on the framerate we
> want.
The way is currently works is that the v4l2 input format blocks until 
there is an available frame (unless you specify the 
AVFMT_FLAG_NONBLOCK... In that case you have to modify ffmpeg.c)

Regarding your patch: as far as I understand, with the current code you 
should never receive EAGAIN as a result (because AVFMT_FLAG_NONBLOCK is 
not used). So, I think this patch is not needed.


			Luca




More information about the ffmpeg-devel mailing list