go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Bug with macOS facetime camera

Open AlexxIT opened this issue 2 years ago • 0 comments

04:07:43.105 INF [api] listen addr=:1984
04:07:43.105 INF [rtsp] listen addr=:8554
2022/08/28 10:07:57 http: panic serving 192.168.1.23:56371: runtime error: slice bounds out of range [42:0]
goroutine 18 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1802 +0xb9
panic({0x15bc680, 0xc00048b4d0})
	runtime/panic.go:1047 +0x266
github.com/AlexxIT/go2rtc/cmd/ffmpeg.loadMedias()
	github.com/AlexxIT/go2rtc/cmd/ffmpeg/device_darwin.go:53 +0x4bf
github.com/AlexxIT/go2rtc/cmd/ffmpeg.getDevice({0xc000060127, 0x15})
	github.com/AlexxIT/go2rtc/cmd/ffmpeg/devices.go:15 +0x47
github.com/AlexxIT/go2rtc/cmd/ffmpeg.Init.func1({0xc000060120, 0x54})
	github.com/AlexxIT/go2rtc/cmd/ffmpeg/ffmpeg.go:68 +0x168
github.com/AlexxIT/go2rtc/cmd/streams.GetProducer({0xc000060120, 0x54})
	github.com/AlexxIT/go2rtc/cmd/streams/handlers.go:34 +0x87
github.com/AlexxIT/go2rtc/cmd/streams.(*Producer).GetMedias(0xc000054480)
	github.com/AlexxIT/go2rtc/cmd/streams/producer.go:36 +0x105
github.com/AlexxIT/go2rtc/cmd/streams.(*Stream).AddConsumer(0xc000170090, {0x16b2e58, 0xc0002d6000})
	github.com/AlexxIT/go2rtc/cmd/streams/stream.go:54 +0x345
github.com/AlexxIT/go2rtc/cmd/webrtc.offerHandler(0xc00029c140, 0xc000296020)
	github.com/AlexxIT/go2rtc/cmd/webrtc/webrtc.go:109 +0x428
github.com/AlexxIT/go2rtc/cmd/api.apiWS({0x16b3ae8, 0xc0002aa0e0}, 0xc0002a4000)
	github.com/AlexxIT/go2rtc/cmd/api/api.go:120 +0x1bc
net/http.HandlerFunc.ServeHTTP(0x0, {0x16b3ae8, 0xc0002aa0e0}, 0x0)
	net/http/server.go:2047 +0x2f
net/http.(*ServeMux).ServeHTTP(0xc0002a600c, {0x16b3ae8, 0xc0002aa0e0}, 0xc0002a4000)
	net/http/server.go:2425 +0x149
net/http.serverHandler.ServeHTTP({0xc000290090}, {0x16b3ae8, 0xc0002aa0e0}, 0xc0002a4000)
	net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc000294000, {0x16b89c0, 0xc0000980c0})
	net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
	net/http/server.go:3034 +0x4e8
2022/08/28 10:08:05 http: panic serving 192.168.1.23:56372: runtime error: slice bounds out of range [42:0]
goroutine 50 [running]:
net/http.(*conn).serve.func1()
	net/http/server.go:1802 +0xb9
panic({0x15bc680, 0xc000026828})
	runtime/panic.go:1047 +0x266
github.com/AlexxIT/go2rtc/cmd/ffmpeg.loadMedias()
	github.com/AlexxIT/go2rtc/cmd/ffmpeg/device_darwin.go:53 +0x4bf
github.com/AlexxIT/go2rtc/cmd/ffmpeg.getDevice({0xc000060127, 0x15})
	github.com/AlexxIT/go2rtc/cmd/ffmpeg/devices.go:15 +0x47
github.com/AlexxIT/go2rtc/cmd/ffmpeg.Init.func1({0xc000060120, 0x54})
	github.com/AlexxIT/go2rtc/cmd/ffmpeg/ffmpeg.go:68 +0x168
github.com/AlexxIT/go2rtc/cmd/streams.GetProducer({0xc000060120, 0x54})
	github.com/AlexxIT/go2rtc/cmd/streams/handlers.go:34 +0x87
github.com/AlexxIT/go2rtc/cmd/streams.(*Producer).GetMedias(0xc000054480)
	github.com/AlexxIT/go2rtc/cmd/streams/producer.go:36 +0x105
github.com/AlexxIT/go2rtc/cmd/streams.(*Stream).AddConsumer(0xc000170090, {0x16b2df8, 0xc00020a690})
	github.com/AlexxIT/go2rtc/cmd/streams/stream.go:54 +0x345
github.com/AlexxIT/go2rtc/cmd/mse.handler(0xc000192200, 0x151e960)
	github.com/AlexxIT/go2rtc/cmd/mse/mse.go:31 +0x1ec
github.com/AlexxIT/go2rtc/cmd/api.apiWS({0x16b3ae8, 0xc0001ac1c0}, 0xc0001c0100)
	github.com/AlexxIT/go2rtc/cmd/api/api.go:120 +0x1bc
net/http.HandlerFunc.ServeHTTP(0x0, {0x16b3ae8, 0xc0001ac1c0}, 0x0)
	net/http/server.go:2047 +0x2f
net/http.(*ServeMux).ServeHTTP(0xc0001a403c, {0x16b3ae8, 0xc0001ac1c0}, 0xc0001c0100)
	net/http/server.go:2425 +0x149
net/http.serverHandler.ServeHTTP({0xc000182270}, {0x16b3ae8, 0xc0001ac1c0}, 0xc0001c0100)
	net/http/server.go:2879 +0x43b
net/http.(*conn).serve(0xc0001c2000, {0x16b89c0, 0xc0000980c0})
	net/http/server.go:1930 +0xb08
created by net/http.(*Server).Serve
	net/http/server.go:3034 +0x4e8

AlexxIT avatar Aug 28 '22 04:08 AlexxIT