diff options
Diffstat (limited to 'bilibili/streaming.go')
-rw-r--r-- | bilibili/streaming.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bilibili/streaming.go b/bilibili/streaming.go index ea9207c..0bda347 100644 --- a/bilibili/streaming.go +++ b/bilibili/streaming.go @@ -54,7 +54,7 @@ func (b Bilibili) CopyLiveStream( b.logger.Info("Copying live stream...") // blocking copy - n, err := common.CopyToFileWithBuffer(ctx, out, resp.Body, buffer, readChunkSize, false) + n, err := common.CopyToFileWithBuffer(ctx, out, resp.Body, buffer, false, uint(len(buffer)/readChunkSize)) if err != nil && !errors.Is(err, context.Canceled) { b.logger.Error("Stream copying was interrupted unexpectedly: %v", err) |