There is a periodic panic because of out of bounds in GetDuration. Let's catch it and see what songs cause it. Also let's use a little bigger buffer of 6200, but I believe it doesn't fix this panic.
This commit is contained in:
parent
a8a9a991d4
commit
b9288c0084
@ -88,6 +88,12 @@ func (dj *DJHandlers) PlaylistNext(w http.ResponseWriter, _ *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
defer func() {
|
||||||
|
if err := recover(); err != nil {
|
||||||
|
log.Printf("Panic occured with %s: %s", nxt, err)
|
||||||
|
}
|
||||||
|
}()
|
||||||
|
|
||||||
newSong := radio.Song{
|
newSong := radio.Song{
|
||||||
Artist: oggf.GetTag("artist"),
|
Artist: oggf.GetTag("artist"),
|
||||||
Title: oggf.GetTag("title"),
|
Title: oggf.GetTag("title"),
|
||||||
|
@ -13,7 +13,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
bufferLength = 6144
|
bufferLength = 6200
|
||||||
OggS = "OggS"
|
OggS = "OggS"
|
||||||
OggSLen = len(OggS)
|
OggSLen = len(OggS)
|
||||||
Vorbis = "vorbis"
|
Vorbis = "vorbis"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user