From 3588edda6b9b0688030ee3095e20f2bb8c945b0b Mon Sep 17 00:00:00 2001 From: qydysky Date: Mon, 10 Apr 2023 01:45:52 +0800 Subject: [PATCH] =?utf8?q?Fix=20stopRec=E4=BA=8B=E4=BB=B6=E5=BD=95?= =?utf8?q?=E5=88=B6=E5=81=9C=E6=AD=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/stream.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Reply/stream.go b/Reply/stream.go index 8a1a113..fa8ce8b 100644 --- a/Reply/stream.go +++ b/Reply/stream.go @@ -1151,6 +1151,12 @@ func (t *M4SStream) Start() bool { contextC, cancle := context.WithCancel(mainContextC) fc.FlashWithCallback(cancle) + // 当stopRec时,取消录制 + ms.msg.Pull_tag_only("stopRec", func(_ *M4SStream) (disable bool) { + cancle() + return true + }) + l := ms.log.Base_add(`文件`) startf := func(_ *M4SStream) error { l.L(`T: `, `start`) -- 2.39.2