[FFmpeg-devel] [PATCH] handle EAGAIN case in ffmpeg.c
Benoit Fouet
benoit.fouet
Wed Sep 12 12:54:58 CEST 2007
Luca Abeni wrote:
> 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?
>
shouldn't the DQBUF return EAGAIN when it has no frame available ?
> (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 check that
> 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)
>
>
i thought the DQBUF was always a non blocking ioctl, isn't it the case ?
> 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.
>
>
ok
--
Ben
Purple Labs S.A.
www.purplelabs.com
More information about the ffmpeg-devel
mailing list