[FFmpeg-cvslog] r22966 - trunk/libavdevice/v4l2.c

Benoit Fouet benoit.fouet
Mon Apr 26 21:49:24 CEST 2010


Hi,

stefano wrote :
> Author: stefano
> Date: Mon Apr 26 21:40:15 2010
> New Revision: 22966
>
> Log:
> Return meaningful error codes, rather than always -1.
>
> Modified:
>    trunk/libavdevice/v4l2.c
>
> 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 ?

Ben




More information about the ffmpeg-cvslog mailing list