Skip to content

Commit

Permalink
[media] gspca - main: Take numerator into account in fps calculations
Browse files Browse the repository at this point in the history
In case we ever get sub drivers which do 7.5 fps and express this as
15 / 2 fps.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean-François Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans de Goede authored and Mauro Carvalho Chehab committed Jan 6, 2012
1 parent d0d3435 commit 1153f04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,9 +646,9 @@ static u32 which_bandwidth(struct gspca_dev *gspca_dev)
if (gspca_dev->sd_desc->get_streamparm) {
struct v4l2_streamparm parm;

parm.parm.capture.timeperframe.denominator = 15;
gspca_dev->sd_desc->get_streamparm(gspca_dev, &parm);
bandwidth *= parm.parm.capture.timeperframe.denominator;
bandwidth /= parm.parm.capture.timeperframe.numerator;
} else {

/* don't hope more than 15 fps with USB 1.1 and
Expand Down

0 comments on commit 1153f04

Please sign in to comment.