bwmarrin/dca

Missing metadata error

WafuRuns opened this issue · 2 comments

(Using Go for Windows x64)
There seems to be issue when audio file doesn't have the ID3 tags.
For command dca -ab 96 -i "D:\01 - Bubblegum Bitch.flac" > D:\file.dca, where input is set to file converted from the CD. Shell is empty and resulting file.dca is regularly playable in Discord.

For command dca -ab 96 -i "D:\01 - Bubblegum Bitch_nometa.flac" > D:\file.dca, where input is set to file with removed ID3 tags. The output is 0Byte file.dca and shell output is:

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x1 addr=0x0 pc=0x40357c]
goroutine 1 [running]:
panic(0x5ad020, 0xc082008080)
C:/Go/src/runtime/panic.go:464 +0x3f4
main.main()
C:/Go/src/github.com/bwmarrin/dca/cmd/dca/main.go:239 +0x1d3c

I'd say, if dca requires these metadata, they should set to something if empty instead of ignoring the file completely. I wanted to use dca for files uploaded by other people, thus I cannot really change metadata for them without using another 3rd party tool.

Got the same error today and can confirm it was the same problem.

Was quite a simple fix to get around it, just needed to put a nil check on FFprobeData.Format.Tags at line 239 where it is happening. Maybe that should be implemented...

Sorry I hadn't noticed this until now. The Go implementation of this is kind of on a back burner for me because I'm pretty busy right now. I actually would recommend people use the Rust version listed on the README. It's faster and has less bugs!

However, I'll keep this open and try to get it resolved.