obsproject / obs-studio

OBS Studio - Free and open source software for live streaming and screen recording
https://obsproject.com
GNU General Public License v2.0
60.47k stars 8k forks source link

UI: Fix falling back to non-multitrack output after error #11534

Closed dsaedtler closed 2 days ago

dsaedtler commented 3 days ago

Description

When an error occurs that prevents multitrack outputs from starting the user is given an option to continue with the regular stream output, clicking "Yes" on that prompt will crash. This PR fixes that by ensuring the necessary fields are captured by copy rahter than reference, as the nested lambdas would result in captured references not working/being invalid.

Motivation and Context

Reported on TEB Discord: https://discord.com/channels/1171528364000018442/1249911465192849409/1304077629413916744

How Has This Been Tested?

Tested fallback by disabling NVENC.

Types of changes

Checklist: