mirror of
https://github.com/navidrome/navidrome.git
synced 2025-04-15 11:40:36 +03:00
refactor: remove unnecessary intermediate buffer for ffmpeg image extraction
Signed-off-by: Deluan <deluan@navidrome.org>
This commit is contained in:
parent
d229ff39e5
commit
2d4f483812
@ -141,13 +141,7 @@ func fromFFmpegTag(ctx context.Context, ffmpeg ffmpeg.FFmpeg, path string) sourc
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, "", err
|
return nil, "", err
|
||||||
}
|
}
|
||||||
defer r.Close()
|
return r, path, nil
|
||||||
buf := new(bytes.Buffer)
|
|
||||||
_, err = io.Copy(buf, r)
|
|
||||||
if err != nil {
|
|
||||||
return nil, "", err
|
|
||||||
}
|
|
||||||
return io.NopCloser(buf), path, nil
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user