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
|
||||
}
|
||||
|
||||
defer func() {
|
||||
if err := recover(); err != nil {
|
||||
log.Printf("Panic occured with %s: %s", nxt, err)
|
||||
}
|
||||
}()
|
||||
|
||||
newSong := radio.Song{
|
||||
Artist: oggf.GetTag("artist"),
|
||||
Title: oggf.GetTag("title"),
|
||||
|
@ -13,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
bufferLength = 6144
|
||||
bufferLength = 6200
|
||||
OggS = "OggS"
|
||||
OggSLen = len(OggS)
|
||||
Vorbis = "vorbis"
|
||||
|
Loading…
x
Reference in New Issue
Block a user