letmaik / pyvirtualcam

🎥 Send frames to a virtual camera from Python
GNU General Public License v2.0
452 stars 49 forks source link

[FIX] file never closed in case of try_open error #59

Closed Guerout-Arnaud closed 3 years ago

Guerout-Arnaud commented 3 years ago

Simply close the file opened by try_open if it wasn't the v4l2 loopback file. Does not matter if device_ was given but can matter if it was not and if a file is finally keep for video output.

letmaik commented 3 years ago

Good spot! Thanks