mirror of
https://github.com/aler9/gortsplib
synced 2025-10-04 23:02:45 +08:00
format: fix compatibility with some TP-Link cameras (#174)
https://github.com/aler9/rtsp-simple-server/issues/1267
This commit is contained in:
@@ -613,7 +613,7 @@ func TestNewFromMediaDescription(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
"generic invalid rtpmap",
|
||||
"application invalid rtpmap",
|
||||
&psdp.MediaDescription{
|
||||
MediaName: psdp.MediaName{
|
||||
Media: "application",
|
||||
@@ -633,7 +633,7 @@ func TestNewFromMediaDescription(t *testing.T) {
|
||||
},
|
||||
},
|
||||
{
|
||||
"generic invalid rtpmap 2",
|
||||
"application invalid rtpmap 2",
|
||||
&psdp.MediaDescription{
|
||||
MediaName: psdp.MediaName{
|
||||
Media: "application",
|
||||
@@ -652,6 +652,27 @@ func TestNewFromMediaDescription(t *testing.T) {
|
||||
RTPMap: "custom/aaa",
|
||||
},
|
||||
},
|
||||
{
|
||||
"application tp-link",
|
||||
&psdp.MediaDescription{
|
||||
MediaName: psdp.MediaName{
|
||||
Media: "application",
|
||||
Protos: []string{"RTP", "AVP"},
|
||||
Formats: []string{"smart/1/90000"},
|
||||
},
|
||||
Attributes: []psdp.Attribute{
|
||||
{
|
||||
Key: "rtpmap",
|
||||
Value: "95 TP-LINK/90000",
|
||||
},
|
||||
},
|
||||
},
|
||||
&Generic{
|
||||
PayloadTyp: 95,
|
||||
RTPMap: "TP-LINK/90000",
|
||||
ClockRat: 90000,
|
||||
},
|
||||
},
|
||||
} {
|
||||
t.Run(ca.name, func(t *testing.T) {
|
||||
format, err := Unmarshal(ca.md, ca.md.MediaName.Formats[0])
|
||||
|
Reference in New Issue
Block a user