Skip to content

🎧 Your Personal Streaming Service

refactor: remove unnecessary intermediate buffer for ffmpeg image extraction

Deluan2d4f4838129f
diff --git a/core/artwork/sources.go b/core/artwork/sources.go
index 30dd88d27..03ebd162c 100644
--- a/core/artwork/sources.go
+++ b/core/artwork/sources.go
@@ -141,13 +141,7 @@ func fromFFmpegTag(ctx context.Context, ffmpeg ffmpeg.FFmpeg, path string) sourc
if err != nil {
return nil, "", err
}
- defer r.Close()
- buf := new(bytes.Buffer)
- _, err = io.Copy(buf, r)
- if err != nil {
- return nil, "", err
- }
- return io.NopCloser(buf), path, nil
+ return r, path, nil
}
}