diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | sys/v4l2/v4l2src_calls.c | 12 |
2 files changed, 21 insertions, 0 deletions
@@ -1,5 +1,14 @@ 2007-11-13 Tim-Philipp Müller <tim at centricular dot net> + * sys/v4l2/v4l2src_calls.c: (gst_v4l2src_probe_caps_for_format): + If VIDIOC_ENUM_FRAMESIZES is defined (= recent kernel), but the + corresponding ioctl() call fails even though the driver claims to + support this format, just fall back to the pre-2.6.19 kernel + routine that creates caps with suitable height and width ranges + (see #448278). + +2007-11-13 Tim-Philipp Müller <tim at centricular dot net> + Patch by: Mark Nauwelaerts <manauw skynet be> * gst/matroska/matroska-demux.c: diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index edd4a013..0b03c999 100644 --- a/sys/v4l2/v4l2src_calls.c +++ b/sys/v4l2/v4l2src_calls.c @@ -810,6 +810,9 @@ gst_v4l2src_probe_caps_for_format (GstV4l2Src * v4l2src, guint32 pixelformat, results = g_list_delete_link (results, results); } + if (gst_caps_is_empty (ret)) + goto enum_framesizes_no_results; + return ret; /* ERRORS */ @@ -821,6 +824,15 @@ enum_framesizes_failed: " (%s)", GST_FOURCC_ARGS (pixelformat), g_strerror (errno)); goto default_frame_sizes; } +enum_framesizes_no_results: + { + /* it's possible that VIDIOC_ENUM_FRAMESIZES is defined but the driver in + * question doesn't actually support it yet */ + GST_DEBUG_OBJECT (v4l2src, "No results for pixelformat %" GST_FOURCC_FORMAT + " enumerating frame sizes, trying fallback", + GST_FOURCC_ARGS (pixelformat)); + goto default_frame_sizes; + } unknown_type: { GST_WARNING_OBJECT (v4l2src, |