Projects
home:Eustace:branches:Eulaceura:Factory
gstreamer-plugins-good
_service:obs_scm:0003-v4l2src-fix.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0003-v4l2src-fix.patch of Package gstreamer-plugins-good
--- gst-plugins-good-0.10.31/sys/v4l2/gstv4l2object.c 2011-12-30 14:59:13.000000000 +0100 +++ gst-plugins-good-0.10.31.fixed/sys/v4l2/gstv4l2object.c 2012-06-05 23:45:16.670981047 +0200 @@ -1583,6 +1583,7 @@ if (ival.type == V4L2_FRMIVAL_TYPE_DISCRETE) { GValue rate = { 0, }; + guint i; g_value_init (&rates, GST_TYPE_LIST); g_value_init (&rate, GST_TYPE_FRACTION); @@ -1602,7 +1603,16 @@ /* swap to get the framerate */ gst_value_set_fraction (&rate, denom, num); - gst_value_list_append_value (&rates, &rate); + /* avoid duplicate framerates, yes some hw reports duplicates :( */ + for (i = 0; i < gst_value_list_get_size(&rates); i++) { + const GValue *val = gst_value_list_get_value(&rates, i); + if (gst_value_compare(val, &rate) == GST_VALUE_EQUAL) { + break; + } + } + if (i == gst_value_list_get_size(&rates)) { + gst_value_list_append_value(&rates, &rate); + } ival.index++; } while (v4l2_ioctl (fd, VIDIOC_ENUM_FRAMEINTERVALS, &ival) >= 0);
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2