Hi,

I'm trying to use PWC with the driver V4L2 of MPlayer
and I have a problem after a call to the IOCTL
function VIDIOC_ENUMSTD.

I get a floating point exception since MPlayer tries
to compute the ratio of numerator / denominator of the
struct framepriod, which pwc leaves NULL.

In the actual implementation (pwc-10.0.11) it olny
sets the "name" and leave all the other fields
unchanged.

I suggest to set the "frameperiod" as in the following
example

file pwc-v4l.c, line 1049

        case VIDIOC_ENUMSTD:
        {
                struct v4l2_standard *std = arg;
                if (std->index != 0)
                        return -EINVAL;
                std->id = V4L2_STD_UNKNOWN;
                strncpy(std->name, "webcam", sizeof(std->name));

                std->frameperiod.numerator = 1;                 // NEW
                std->frameperiod.denominator = pdev->vframes;   // NEW

                return 0;
        }

what do you think?



                
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 

_______________________________________________
pwc mailing list
[email protected]
http://lists.saillard.org/mailman/listinfo/pwc

Reply via email to