[FFmpeg-cvslog] r22966 - trunk/libavdevice/v4l2.c
Stefano Sabatini
stefano.sabatini-lala
Wed Apr 28 00:50:21 CEST 2010
On date Tuesday 2010-04-27 09:32:09 +0200, Luca Abeni wrote:
> Benoit Fouet wrote:
> [...]
> >>Modified: trunk/libavdevice/v4l2.c
> >>==============================================================================
> >>--- trunk/libavdevice/v4l2.c Mon Apr 26 15:36:17 2010 (r22965)
> >>+++ trunk/libavdevice/v4l2.c Mon Apr 26 21:40:15 2010 (r22966)
> >>@@ -174,20 +174,20 @@ static int device_open(AVFormatContext *
> >> av_log(ctx, AV_LOG_ERROR, "QUERYCAP not implemented, probably V4L device but not supporting V4L2\n");
> >> close(fd);
> >>- return -1;
> >>+ return AVERROR(errno);
> >
> >and what if close() updates errno ?
>
> You are right... Sorry for not noticing this issue before. I'll have
> a look later, but I suspect the only thing we can do is to return a
> fixed error number (ENODEV, in this case) or to save errno before
> calling close().
Check the attached patch.
Regards.
More information about the ffmpeg-cvslog
mailing list