GNOME Bugzilla – Bug 506682
[v4lsrc] creates wrong caps on the source pad (width and height range)
Last modified: 2010-11-05 08:37:46 UTC
The v4lsrc sets the width and the height in the caps as a range between the min and max resolution of the device. However this width and height can't be a random set between this two values. but must be a fixed set of resolutions like (174x144, 40x480) In reverse caps negotiation the wrong caps can be selected and therefore crash the v4l device.
That second resolution needs to be 640x480 :-)
Created attachment 101941 [details] [review] add fixed resolutions from vcap This patch adds fixed resolutions (min and max) for the v4l device.
Hm, so it's always just two resolutions that are supported by v4l? Without knowing anything about v4l it seems more likely that there are a fixed number of resolutions between this max and min and there should be some way to get them ;)
Indeed there can be some more fixed resolutions defined between min and max values. This patch just prevents crashing because of the false caps with setting the caps too restrictive... I also don't know much about v4l so don't know if this assumptions are true...
Hey Sebastian, you set this bug to NEEDINFO with comment #3. I guess, the question has been answered in comment #4 and I am thus reopening.
Right, the questions are answered but there's still no better solution ;)
I think this bug can be closed. The v4l2src now queries available frame size if the driver supports VIDIOC_ENUM_FRAMESIZES. If it doesn't VIDIOC_S_FMT will return with a different frame size. That will be reported as an error in gst_v4l2_object_set_format().