File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,9 @@ public class UpscalingExportSession {
383383 while assetWriterInput. isReadyForMoreMediaData {
384384 if let nextSampleBuffer = assetReaderOutput. copyNextSampleBuffer ( ) {
385385 if nextSampleBuffer. presentationTimeStamp. isNumeric {
386- progress. completedUnitCount = Int64 ( nextSampleBuffer. presentationTimeStamp. seconds)
386+ DispatchQueue . main. async {
387+ progress. completedUnitCount = Int64 ( nextSampleBuffer. presentationTimeStamp. seconds)
388+ }
387389 }
388390 if let imageBuffer = nextSampleBuffer. imageBuffer {
389391 let upscaledImageBuffer = upscaler. upscale (
@@ -433,7 +435,9 @@ public class UpscalingExportSession {
433435 while assetWriterInput. isReadyForMoreMediaData {
434436 if let nextSampleBuffer = assetReaderOutput. copyNextSampleBuffer ( ) {
435437 if nextSampleBuffer. presentationTimeStamp. isNumeric {
436- progress. completedUnitCount = Int64 ( nextSampleBuffer. presentationTimeStamp. seconds)
438+ DispatchQueue . main. async {
439+ progress. completedUnitCount = Int64 ( nextSampleBuffer. presentationTimeStamp. seconds)
440+ }
437441 }
438442 if let taggedBuffers = nextSampleBuffer. taggedBuffers {
439443 let leftEyeBuffer = taggedBuffers. first ( where: {
You can’t perform that action at this time.
0 commit comments