Compare commits

...

2 Commits

Author SHA1 Message Date
Cedric Verstraeten
36b93a34b4 check if QUEUE is not null ;) 2023-02-23 15:16:41 +01:00
Cedric Verstraeten
b0d2409524 stop the motion and livestreaming threads first 2023-02-23 14:58:48 +01:00

View File

@@ -136,7 +136,7 @@ func ForwardSDStream(ctx context.Context, clientID string, connection *Connectio
logreader:
for {
var encodedImage string
if cursor != nil && decoder != nil {
if queue != nil && cursor != nil && decoder != nil {
pkt, err := cursor.ReadPacket()
if err == nil {
if !pkt.IsKeyFrame {