Decoder.GetAudioExt() return extension with .

This commit is contained in:
Emmm Monster
2021-05-16 12:15:22 +08:00
parent 9caf11217b
commit f9686bbfc4
7 changed files with 19 additions and 7 deletions

View File

@@ -201,7 +201,9 @@ func (d *Decoder) Decode() error {
func (d Decoder) GetAudioExt() string {
if d.meta != nil {
return d.meta.GetFormat()
if format := d.meta.GetFormat(); format != "" {
return "." + d.meta.GetFormat()
}
}
return ""
}