vansante / go-ffprobe

Library to easily get the ffprobe output of a given file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Got panic when URL is not accessible

bastengao opened this issue · comments

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x78 pc=0x10300f074]

goroutine 1 [running]:
gopkg.in/vansante/go-ffprobe%2ev2.runProbe(0x1400013a000)
	/Users/bastengao/go/pkg/mod/gopkg.in/vansante/go-ffprobe.v2@v2.1.0/ffprobe.go:86 +0x2d4
gopkg.in/vansante/go-ffprobe%2ev2.ProbeURL({0x103060a70?, 0x1400010e0c0}, {0x103019d5f, 0x55}, {0x0?, 0x0, 0x1400006aeb8?})
	/Users/bastengao/go/pkg/mod/gopkg.in/vansante/go-ffprobe.v2@v2.1.0/ffprobe.go:37 +0x254

ffprobe -loglevel fatal -print_format json -show_format -show_streams bad_url

{

}

Got empty response when got bad URL.

commented

@bastengao Thank you for your bug report and MR, I have merged the MR and will be tagging a new release.