]> 127.0.0.1 Git - bili_danmu/.git/commitdiff
flv mp4流服务中断连接
authorqydysky <qydysky@foxmail.com>
Sun, 13 Jun 2021 10:07:17 +0000 (18:07 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 13 Jun 2021 10:07:17 +0000 (18:07 +0800)
Reply/F.go

index 5fa7aa6b9fbc401f65196f8211f30d2beac345bd..22cb9136a466ba406d7313a6d91a9e9239041d13 100644 (file)
@@ -905,9 +905,6 @@ func Savestreamf(){
                        reqs.Push_tag(`close`,nil)
                        out.Close()
 
-                       l.L(`I: `,"结束")
-                       Ass_f("", time.Now())//ass
-                       savestream.front = []byte{}//flv头及首tag置空
                        p.FileMove(savestream.path+".flv.dtmp", savestream.path+".flv")
                } else {
                        savestream.path += "/"
@@ -1352,12 +1349,13 @@ func Savestreamf(){
                        }
 
                        hls_msg.Push_tag(`close`, nil)
-                       savestream.front = []byte{}//头置空
-                       l.L(`I: `,"结束")
-                       Ass_f("", time.Now())//ass
                }
                //set ro ``
                savestream.path = ``
+               savestream.front = []byte{}//flv头及首tag置空
+               savestream.stream.Push_tag("close", nil)
+               Ass_f("", time.Now())//ass
+               l.L(`I: `,"结束")
 
                if !savestream.cancel.Islive() {
                        // l.L(`I: `,"退出")