mirror of
https://github.com/Monibuca/plugin-rtsp.git
synced 2025-09-27 12:02:20 +08:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
2e9cf9a4ca |
@@ -279,10 +279,11 @@ func (client *RTSP) startStream() {
|
||||
//loggerTime := time.Now().Add(-10 * time.Second)
|
||||
defer func() {
|
||||
if client.Err() == nil && config.Reconnect {
|
||||
Printf("reconnecting:", client.URL)
|
||||
Printf("reconnecting:%s", client.URL)
|
||||
client.RTSPClientInfo = RTSPClientInfo{}
|
||||
if err := client.requestStream(); err != nil {
|
||||
Println(err)
|
||||
client.Close()
|
||||
client.Stop()
|
||||
return
|
||||
}
|
||||
go client.startStream()
|
||||
@@ -331,6 +332,9 @@ func (client *RTSP) startStream() {
|
||||
pack = &RTPPack{
|
||||
Type: RTP_TYPE_AUDIO,
|
||||
}
|
||||
if client.ACodec == "" {
|
||||
continue
|
||||
}
|
||||
case client.aRTPControlChannel:
|
||||
pack = &RTPPack{
|
||||
Type: RTP_TYPE_AUDIOCONTROL,
|
||||
|
Reference in New Issue
Block a user