hyperion.ng icon indicating copy to clipboard operation
hyperion.ng copied to clipboard

Fix SEGFAULT in V4L2Grabber

Open drzony opened this issue 3 years ago • 1 comments

Summary

Fixes SEGFAULT caused by an improper auto deduction.

What kind of change does this PR introduce? (check at least one)

  • [x] Bugfix
  • [ ] Feature
  • [ ] Code style update
  • [ ] Refactor
  • [ ] Docs
  • [ ] Build-related changes
  • [ ] Other, please describe:

If changing the UI of web configuration, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • [ ] Yes
  • [x] No

If yes, please describe the impact and migration path for existing setups:

The PR fulfills these requirements:

  • [ ] When resolving a specific issue, it's referenced in the PR's body (e.g. Fixes: #xxx[,#xxx], where "xxx" is the issue number)

If adding a new feature, the PR's description includes:

  • [ ] A convincing reason for adding this feature
  • [ ] Related documents have been updated (docs/docs/en)
  • [ ] Related tests have been updated

PLEASE DON'T FORGET TO ADD YOUR CHANGES TO CHANGELOG.MD

  • [x] Yes, CHANGELOG.md is also updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

drzony avatar Aug 02 '22 20:08 drzony

Hello @drzony :wave:

I'm the Hyperion Project Bot and I want to thank you for contributing to Hyperion with your pull requests!

To help you and other users test your pull requests faster, I'll create a link for you to your workflow artifacts.

:link: https://github.com/hyperion-project/hyperion.ng/actions/runs/2785100310

Of course, if you make changes to your PR, I will create a new link.

Best regards, Hyperion Project

hyperion-project[bot] avatar Aug 02 '22 20:08 hyperion-project[bot]

@drzony Thanks for your contribution in correcting proper use of iterators! While you are anyway fixing interators in the given file, would you mind having a check, if the use of interators in the other methods should be "improved" too?

Maybe in

  • V4L2Grabber::discover()
  • V4L2Grabber::enumVideoCaptureDevices() ?

Thank you!

Lord-Grey avatar Aug 14 '22 13:08 Lord-Grey

Hey @drzony I created a new link to your workflow artifacts: :link: https://github.com/hyperion-project/hyperion.ng/actions/runs/2859922936

hyperion-project[bot] avatar Aug 15 '22 10:08 hyperion-project[bot]

@Lord-Grey Corrected iterators in the file, also reduced the number of loops in discover

drzony avatar Aug 15 '22 10:08 drzony

@Lord-Grey Corrected iterators in the file, also reduced the number of loops in discover

@drzony Thank you so much for the additional clean-ups and simplification of the code. Happy hearing from you on further fixes, clean-up or simplifications :)

Lord-Grey avatar Aug 19 '22 08:08 Lord-Grey

You're welcome

drzony avatar Aug 19 '22 08:08 drzony