Menu

#18 fixes S_FMT and TRY_SMT ioctl - fixing library segfaults

open
nobody
Driver (16)
5
2011-03-05
2011-03-05
cristi
No

Specs are saying S_FMT and TRY_FMT should behave as G_FMT and return the current settings Which is not the case for various fields.
Once such field that is not set - bytesperline is making any program using libv4l (and libv4lconvert) segfault when that library wants to do conversion because it is using bytesperpixel as returned by S_FMT.
Happens to me w/ some own program + ekiga, w/ device 174f:6a31

Note: haven't tested the TRY_FMT change.
Patch - which needs a little bit of lines removal is done between svn tag 2.1.0 and the source as found in my Mandriva Cookier.

from some logs I created, from libv4l2:
VIDIOC_S_FMT app requesting: YU12
VIDIOC_S_FMT converting from: RGB3
libv4l2: v4l2_set_src_and_dest_format: src format w=320 h=240 bytesperline=640 format=RGB3
libv4l2: v4l2_set_src_and_dest_format: dest format w=320 h=240 bytesperline=320 format=YU12

Discussion

  • cristi

    cristi - 2011-03-05

    patch to fix S_FMT and TRY_FMT

     
  • cristi

    cristi - 2011-03-05

    sorry: VIDIOC_S_FMT and VIDIOC_TRY_FMT not TRY_SMT.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.