v4l2: handle return value -ENOTTY for unimplemented VIDIOC_G_PARM

Newer kernels return -ENOTTY, older kernels return -EINVAL if the ioctl
is not implemented. With this patch, GStreamer handles both cases.

https://bugzilla.gnome.org/show_bug.cgi?id=698825
This commit is contained in:
Philipp Zabel 2012-07-05 18:02:27 +02:00 committed by Sebastian Dröge
parent bf3a0b7e37
commit 4d3f6850ca

View file

@ -2461,7 +2461,7 @@ invalid_pixelformat:
get_parm_failed:
{
/* it's possible that this call is not supported */
if (errno != EINVAL) {
if (errno != EINVAL && errno != ENOTTY) {
GST_ELEMENT_WARNING (v4l2object->element, RESOURCE, SETTINGS,
(_("Could not get parameters on device '%s'"),
v4l2object->videodev), GST_ERROR_SYSTEM);