fix(export): address remaining PR #295 review threads

- Include `resolvedWebcamVideoUrl` in the dependency arrays for
  `captureProjectThumbnail` and `handleExport` so thumbnail capture and
  export settings stay in sync when the webcam URL refreshes.
- Clear `VideoMuxer.streamSink` before awaiting `closeIpcExportStream`
  in `finalize()` to close the race where a concurrent `destroy()` →
  `abortStream()` could try to close the same stream ID a second time.
This commit is contained in:
大彪
2026-04-24 16:02:37 +08:00
parent f8122bde18
commit f05dc1f495
2 changed files with 6 additions and 1 deletions
@@ -946,6 +946,7 @@ export default function VideoEditor() {
cursorTelemetry,
clipRegions,
padding,
resolvedWebcamVideoUrl,
shadowIntensity,
showCursor,
speedRegions,
@@ -4356,6 +4357,7 @@ export default function VideoEditor() {
padding,
cropRegion,
webcam,
resolvedWebcamVideoUrl,
annotationRegions,
autoCaptions,
autoCaptionSettings,
+4 -1
View File
@@ -172,8 +172,11 @@ export class VideoMuxer {
if (!sink) {
throw new Error("Stream target closed before finalization");
}
const closeResult = await closeIpcExportStream(sink.streamId);
// Clear streamSink before awaiting close so a concurrent destroy()→
// abortStream() short-circuits on `!this.streamSink` instead of racing
// us for the same streamId.
this.streamSink = null;
const closeResult = await closeIpcExportStream(sink.streamId);
return {
mode: "stream",
tempFilePath: closeResult.tempPath,