Blame SOURCES/0003-v4l2src-fix.patch
|
|
0dd771 |
--- gst-plugins-good-0.10.31/sys/v4l2/gstv4l2object.c 2011-12-30 14:59:13.000000000 +0100
|
|
|
0dd771 |
+++ gst-plugins-good-0.10.31.fixed/sys/v4l2/gstv4l2object.c 2012-06-05 23:45:16.670981047 +0200
|
|
|
0dd771 |
@@ -1583,6 +1583,7 @@
|
|
|
0dd771 |
|
|
|
0dd771 |
if (ival.type == V4L2_FRMIVAL_TYPE_DISCRETE) {
|
|
|
0dd771 |
GValue rate = { 0, };
|
|
|
0dd771 |
+ guint i;
|
|
|
0dd771 |
|
|
|
0dd771 |
g_value_init (&rates, GST_TYPE_LIST);
|
|
|
0dd771 |
g_value_init (&rate, GST_TYPE_FRACTION);
|
|
|
0dd771 |
@@ -1602,7 +1603,16 @@
|
|
|
0dd771 |
|
|
|
0dd771 |
/* swap to get the framerate */
|
|
|
0dd771 |
gst_value_set_fraction (&rate, denom, num);
|
|
|
0dd771 |
- gst_value_list_append_value (&rates, &rate;;
|
|
|
0dd771 |
+ /* avoid duplicate framerates, yes some hw reports duplicates :( */
|
|
|
0dd771 |
+ for (i = 0; i < gst_value_list_get_size(&rates); i++) {
|
|
|
0dd771 |
+ const GValue *val = gst_value_list_get_value(&rates, i);
|
|
|
0dd771 |
+ if (gst_value_compare(val, &rate) == GST_VALUE_EQUAL) {
|
|
|
0dd771 |
+ break;
|
|
|
0dd771 |
+ }
|
|
|
0dd771 |
+ }
|
|
|
0dd771 |
+ if (i == gst_value_list_get_size(&rates)) {
|
|
|
0dd771 |
+ gst_value_list_append_value(&rates, &rate;;
|
|
|
0dd771 |
+ }
|
|
|
0dd771 |
|
|
|
0dd771 |
ival.index++;
|
|
|
0dd771 |
} while (v4l2_ioctl (fd, VIDIOC_ENUM_FRAMEINTERVALS, &ival) >= 0);
|