summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorLuis de Bethencourt <luis.bg@samsung.com>2015-02-18 17:49:29 +0000
committerLuis de Bethencourt <luis.bg@samsung.com>2015-02-18 17:49:31 +0000
commitb91fe36644b15ae070d72b9e8a9c7087e82aef12 (patch)
tree7f954289e855cf74dc9632881908f0a039811c15 /sys
parent171bfeccdf94cc790aef4568cac2e24a2026939d (diff)
v4l2: fraction is reversed
In the fraction 1 / 2. 1 is the numerator and 2 is the denominator. The arguments of fraction gst_value_set_fractions() are value, numerator and denominator. Also, gst_value_set_fraction() fails if denominator is 0 for obvious reasons.
Diffstat (limited to 'sys')
-rw-r--r--sys/v4l2/v4l2_calls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index d1cc2842d..4ccbbf553 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -216,8 +216,8 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
GstTunerNorm *norm;
/* fill in defaults */
- standard.frameperiod.numerator = 1;
- standard.frameperiod.denominator = 0;
+ standard.frameperiod.numerator = 0;
+ standard.frameperiod.denominator = 1;
standard.index = n;
if (v4l2_ioctl (v4l2object->video_fd, VIDIOC_ENUMSTD, &standard) < 0) {
@@ -238,14 +238,14 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
}
GST_DEBUG_OBJECT (e, " '%s', fps: %d / %d",
- standard.name, standard.frameperiod.denominator,
- standard.frameperiod.numerator);
+ standard.name, standard.frameperiod.numerator,
+ standard.frameperiod.denominator);
v4l2norm = g_object_new (GST_TYPE_V4L2_TUNER_NORM, NULL);
norm = GST_TUNER_NORM (v4l2norm);
norm->label = g_strdup ((const gchar *) standard.name);
gst_value_set_fraction (&norm->framerate,
- standard.frameperiod.denominator, standard.frameperiod.numerator);
+ standard.frameperiod.numerator, standard.frameperiod.denominator);
v4l2norm->index = standard.id;
GST_DEBUG_OBJECT (v4l2object->element, "index=%08x, label=%s",