From ba0c7d911d67f9428cbde6f82d6cf21d12631ee4 Mon Sep 17 00:00:00 2001 From: Alexey Khit Date: Fri, 13 Jan 2023 13:36:43 +0300 Subject: [PATCH] Fix ffmpeg link to same stream --- cmd/streams/stream.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/streams/stream.go b/cmd/streams/stream.go index 8079edf4..0a675b1f 100644 --- a/cmd/streams/stream.go +++ b/cmd/streams/stream.go @@ -102,9 +102,10 @@ func (s *Stream) AddConsumer(cons streamer.Consumer) (err error) { } s.wg.Done() - s.wg.Wait() if len(producers) == 0 { + s.wg.Wait() + s.stopProducers() if len(codecs) > 0 {