diff -Naur gst-plugins-base-0.10.7/sys/v4l/v4lsrc_calls.c gst-plugins-base-0.10.7.new/sys/v4l/v4lsrc_calls.c --- gst-plugins-base-0.10.7/sys/v4l/v4lsrc_calls.c 2006-02-05 19:16:13 +0300 +++ gst-plugins-base-0.10.7.new/sys/v4l/v4lsrc_calls.c 2006-06-12 07:12:49 +0400 @@ -488,6 +488,22 @@ return FALSE; } + /* + * This is a dirty hack (use V4L2 API in V4L1 application), but we + * need to do that becouse V4L1 API don't have STREAMOFF equivalent. + * + * Without that, device driver will not allow us to do other VIDIOCGMBUF + * calls (only when video_fd will be closed driver stop cature stream + * by self). + */ + enum v4l2_buf_type buf_type = V4L2_BUF_TYPE_VIDEO_CAPTURE; + if (ioctl (GST_V4LELEMENT (v4lsrc)->video_fd, VIDIOC_STREAMOFF, &buf_type) < 0) { + GST_ELEMENT_ERROR (v4lsrc, RESOURCE, READ, (NULL), + ("Error in stream off operation: %s", g_strerror (errno))); + munmap (buffer, vmbuf.size); + return FALSE; + } + munmap (buffer, vmbuf.size); /* if we got here, it worked! woohoo, the format is supported! */