Fix MP4 consumer with only audio

This commit is contained in:
Alexey Khit
2023-08-21 07:31:21 +03:00
parent c1c1d84cef
commit f80f179e4c
2 changed files with 16 additions and 0 deletions
+12
View File
@@ -52,6 +52,18 @@ func (c *Codec) IsRTP() bool {
return c.PayloadType != PayloadTypeRAW
}
func (c *Codec) IsVideo() bool {
return c.Kind() == KindVideo
}
func (c *Codec) IsAudio() bool {
return c.Kind() == KindAudio
}
func (c *Codec) Kind() string {
return GetKind(c.Name)
}
func (c *Codec) Clone() *Codec {
clone := *c
return &clone