Commit 8e392f2
fix: do not release a claim while its output is still writing
Two windows where the claim was dropped early, both found in review.
A failed obs_output_start() does not mean the output is idle:
obs_output_can_begin_data_capture() refuses while active(output), so calling
start() twice lands in the failure path with the first muxer still writing.
Only release when the output is genuinely not active.
Both recording Destroy handlers deregistered the object before deleting it, and
only the destructor called DeleteOutput(), which can wait up to 20s for the
muxer to drain. For that whole window the file was still being written while its
claim was invisible to a concurrent Start. Stop first, then deregister;
DeleteOutput() is idempotent so the destructor's call becomes a no-op.
The on-disk check covers most of both windows -- the file exists by then -- but
not when overwrite is set, which suppresses exactly that check.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 01e3c2a commit 8e392f2
3 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
183 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
0 commit comments