mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-10-29 17:27:08 +08:00
1 parent
8f9e194c0c
commit
bb3abdea1d
22 files changed
+322
-122
No files matched your search
@@ -130,12 +130,7 @@ func (e *Editor) outputSnapshot(ctx context.Context, options WriteOptions) (*Edi
|
||||
return nil, err
|
||||
}
|
||||
snapshot := *e
|
||||
snapshot.OnWriteProgress = func(stage string, completed, total int) error {
|
||||
if err := ctx.Err(); err != nil {
|
||||
return err
|
||||
}
|
||||
return editorProgress(e.OnWriteProgress).report(stage, completed, total)
|
||||
}
|
||||
snapshot.OnWriteProgress = editorProgress(e.OnWriteProgress).withContext(ctx)
|
||||
snapshot.output = &outputOptimization{ctx: ctx, options: options.Compression}
|
||||
if options.Compression.Mode == CompressionUnchanged {
|
||||
return &snapshot, nil
|
||||
|
||||
Reference in new issue
Block a user