Re: qv4l2 crashes if output device implements VIDIOC_ENUM_FRAMESIZES

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Martin,

On 1/9/24 11:17, Martin Tůma wrote:
> Hi,
> If a driver implements VIDIOC_ENUM_FRAMESIZES for a output device, qv4l2 
> crashes in general-tab.cpp:2169 due to m_frameSize being 0. As all other 
> usages of m_frameSize in the GeneralTab::updateFrameSize() function are 
> guarded by "NULL checks" an obvious fix would be to guard the "addItem 
> while cycle" as well. But maybe a better solution would be to add the 
> frame size combobox to output devices as well. Or are the output devices 
> not supposed to have frame sizes enumeration?

You do not expect to see it for output devices. Those will typically use
VIDIOC_ENUMSTD or VIDIOC_ENUM_DV_TIMINGS. VIDIOC_ENUM_FRAMESIZES is something
that only makes sense for output devices if they do not support ENUMSTD or
ENUM_DV_TIMINGS, i.e. it has some very odd output hardware. In particular
vivid doesn't support this for the emulated video output.

I don't think v4l2-compliance has a check for this. I think it should at
least issue a warning if the video output devices supports ENUM_FRAMESIZES
and also ENUMSTD or ENUM_DV_TIMINGS.

In any case, qv4l2 shouldn't crash, so an initial fix should be to check
for m_frameSize being 0. A patch is welcome.

Which driver is this? I assume it is an out-of-tree driver, since I am
not aware of any mainline drivers that do this.

Regards,

	Hans




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux