Skip to content

Commit

Permalink
fix: support ffmpeg option '-rtsp_transport udp' while receiving
Browse files Browse the repository at this point in the history
  • Loading branch information
aler9 committed Jan 14, 2020
1 parent 55262b6 commit 888691d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,17 @@ func (c *client) handleRequest(req *rtsp.Request) bool {
// play
case "STARTING", "PRE_PLAY":
// play via UDP
if _, ok := th["RTP/AVP"]; ok {
if func() bool {
_, ok := th["RTP/AVP"]
if ok {
return true
}
_, ok = th["RTP/AVP/UDP"]
if ok {
return true
}
return false
}() {
rtpPort, rtcpPort := th.getClientPorts()
if rtpPort == 0 || rtcpPort == 0 {
c.writeResError(req, fmt.Errorf("transport header does not have valid client ports (%s)", transportstr))
Expand Down

0 comments on commit 888691d

Please sign in to comment.