{"record":{"id":"a143da3cf87db8eb","repo":"AlexxIT/go2rtc","slug":"wrong-transport-s","errorCode":null,"errorMessage":"wrong transport: %s","messagePattern":"wrong transport: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/rtsp/client.go","lineNumber":379,"sourceCode":"\t\t\t\t\t_, _ = c.WriteToUDP([]byte{0x80, 0x00, 0x00, 0x00}, channel)\n\t\t\t\t\t_, _ = c.WriteToUDP([]byte{0x80, 0xC8, 0x00, 0x01}, channel+1)\n\t\t\t\t}()\n\t\t\t}\n\t\t}\n\n\t\treturn channel, nil\n\t} else {\n\t\t// we send our `interleaved`, but camera can answer with another\n\n\t\t// Transport: RTP/AVP/TCP;unicast;interleaved=10-11;ssrc=10117CB7\n\t\t// Transport: RTP/AVP/TCP;unicast;destination=192.168.1.111;source=192.168.1.222;interleaved=0\n\t\t// Transport: RTP/AVP/TCP;ssrc=22345682;interleaved=0-1\n\t\t// Escam Q6 has a bug:\n\t\t// Transport: RTP/AVP;unicast;destination=192.168.1.111;source=192.168.1.222;interleaved=0-1\n\t\ts := core.Between(transport, \"interleaved=\", \"-\")\n\t\ti, err := strconv.Atoi(s)\n\t\tif err != nil {\n\t\t\treturn 0, fmt.Errorf(\"wrong transport: %s\", transport)\n\t\t}\n\n\t\treturn byte(i), nil\n\t}\n}\n\nfunc (c *Conn) Play() (err error) {\n\treq := &tcp.Request{Method: MethodPlay, URL: c.URL}\n\treturn c.WriteRequest(req)\n}\n\nfunc (c *Conn) Teardown() (err error) {\n\t// allow TEARDOWN from any state (ex. ANNOUNCE > SETUP)\n\treq := &tcp.Request{Method: MethodTeardown, URL: c.URL}\n\treturn c.WriteRequest(req)\n}\n\nfunc (c *Conn) Close() error {","sourceCodeStart":361,"sourceCodeEnd":397,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/rtsp/client.go#L361-L397","documentation":"In TCP interleaved mode the camera's SETUP response Transport header either lacks a usable interleaved= field or is malformed (including the Escam Q6 bug variant), so the RTP channel cannot be determined. The offending transport string is included.","triggerScenarios":"Thrown at pkg/rtsp/client.go:379 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Extend the Transport header parser to accept the returned variant","Fall back to UDP transport if the server's TCP interleaved response is unparseable"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}