v4l2object: clear old fds when initializing poll during opening v4l2 device
requested to merge ChaoGuo/gstreamer:clear_old_fds_in_poll_when_re_initializing_poll_during_opening_v4l2_device into main
- Problem Description:
Run Cheese on IMX platform, change resolution in video mode.
Start recording video, Cheese will hang.
- Cheese Version:
41.1
- Root Cause:
When reopening a v4l2 device, the v4l2object->poll will include some old fds, which was assigned
to this device before. If the pipeline opens multiple v4l2 devices, the old fd may been assigned to
other v4l2 devices when reopening devices.
This will cause the timing of the pipeline become confusing when polling devices,leading functional
abnormalities.
- Solution:
when initializing poll, clear the old fds in poll to ensure that the pipeline timing is normal.