mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
track_h264: avoid appending empty sps to fmtp line (#129)
This avoids adding fmtp lines of the form "sprop-parameter-sets=" with no value.
This commit is contained in:
@@ -144,7 +144,9 @@ func (t *TrackH264) MediaDescription() *psdp.MediaDescription {
|
|||||||
if t.PPS != nil {
|
if t.PPS != nil {
|
||||||
tmp = append(tmp, base64.StdEncoding.EncodeToString(t.PPS))
|
tmp = append(tmp, base64.StdEncoding.EncodeToString(t.PPS))
|
||||||
}
|
}
|
||||||
fmtp += "; sprop-parameter-sets=" + strings.Join(tmp, ",")
|
if len(tmp) > 0 {
|
||||||
|
fmtp += "; sprop-parameter-sets=" + strings.Join(tmp, ",")
|
||||||
|
}
|
||||||
|
|
||||||
if len(t.SPS) >= 4 {
|
if len(t.SPS) >= 4 {
|
||||||
fmtp += "; profile-level-id=" + strings.ToUpper(hex.EncodeToString(t.SPS[1:4]))
|
fmtp += "; profile-level-id=" + strings.ToUpper(hex.EncodeToString(t.SPS[1:4]))
|
||||||
|
Reference in New Issue
Block a user