临时文件使用随机数

This commit is contained in:
Jerry Yan 2025-04-13 14:57:11 +08:00
parent adf4186156
commit c6a6518248

View File

@ -71,7 +71,7 @@ func runFfmpegForMultipleFile1(ctx context.Context, task *dto.FfmpegTask) bool {
wg.Add(1)
go func(file *dto.File) {
defer wg.Done()
tmpFile := path.Join(os.TempDir(), file.Name+".ts")
tmpFile := path.Join(os.TempDir(), file.Name+strconv.Itoa(rand.Int())+".ts")
result, err := convertMp4ToTs(subCtx, *file, tmpFile)
if err != nil {
log.Printf("转码出错: %v", err)