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

Luca Abeni lucabe72
Tue Apr 27 09:32:09 CEST 2010


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().


			Thanks,
				Luca



More information about the ffmpeg-cvslog mailing list