Fix stop ffmpeg without matching tracks

This commit is contained in:
Alexey Khit
2022-11-13 22:24:37 +03:00
parent e6d3939c78
commit 4815ce1baf
3 changed files with 23 additions and 27 deletions
+1 -4
View File
@@ -460,10 +460,7 @@ func (c *Conn) Play() (err error) {
}
func (c *Conn) Teardown() (err error) {
if c.state != StatePlay {
return fmt.Errorf("RTSP TEARDOWN from wrong state: %s", c.state)
}
// allow TEARDOWN from any state (ex. ANNOUNCE > SETUP)
req := &tcp.Request{Method: MethodTeardown, URL: c.URL}
return c.Request(req)
}