mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 15:16:51 +08:00
make format.String() return MPEG4-audio in case of MPEG-4 audio (#300)
This commit is contained in:
@@ -100,7 +100,8 @@ func (f *MPEG4AudioGeneric) unmarshal(
|
||||
|
||||
// String implements Format.
|
||||
func (f *MPEG4AudioGeneric) String() string {
|
||||
return "MPEG4-audio-gen"
|
||||
// currently, String() returns the codec name, hence hide the format name.
|
||||
return "MPEG4-audio"
|
||||
}
|
||||
|
||||
// ClockRate implements Format.
|
||||
|
@@ -21,7 +21,7 @@ func TestMPEG4AudioGenericAttributes(t *testing.T) {
|
||||
IndexLength: 3,
|
||||
IndexDeltaLength: 3,
|
||||
}
|
||||
require.Equal(t, "MPEG4-audio-gen", format.String())
|
||||
require.Equal(t, "MPEG4-audio", format.String())
|
||||
require.Equal(t, 48000, format.ClockRate())
|
||||
require.Equal(t, true, format.PTSEqualsDTS(&rtp.Packet{}))
|
||||
}
|
||||
|
@@ -87,7 +87,8 @@ func (f *MPEG4AudioLATM) unmarshal(
|
||||
|
||||
// String implements Format.
|
||||
func (f *MPEG4AudioLATM) String() string {
|
||||
return "MPEG4-audio-latm"
|
||||
// currently, String() returns the codec name, hence hide the format name.
|
||||
return "MPEG4-audio"
|
||||
}
|
||||
|
||||
// ClockRate implements Format.
|
||||
|
@@ -25,7 +25,7 @@ func TestMPEG4AudioLATMAttributes(t *testing.T) {
|
||||
}},
|
||||
},
|
||||
}
|
||||
require.Equal(t, "MPEG4-audio-latm", format.String())
|
||||
require.Equal(t, "MPEG4-audio", format.String())
|
||||
require.Equal(t, 44100, format.ClockRate())
|
||||
require.Equal(t, true, format.PTSEqualsDTS(&rtp.Packet{}))
|
||||
}
|
||||
|
Reference in New Issue
Block a user