mirror of
https://github.com/aler9/gortsplib
synced 2025-10-05 23:26:54 +08:00
print track IDs from 1 instead of 0 in error messages
This commit is contained in:
@@ -25,7 +25,7 @@ func ReadTracks(byts []byte) (Tracks, error) {
|
||||
for i, md := range sd.MediaDescriptions {
|
||||
t, err := newTrackFromMediaDescription(md)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to parse track %d: %s", i, err)
|
||||
return nil, fmt.Errorf("unable to parse track %d: %s", i+1, err)
|
||||
}
|
||||
|
||||
tracks[i] = t
|
||||
|
@@ -31,7 +31,7 @@ func TestTracksReadErrors(t *testing.T) {
|
||||
"a=rtpmap:97 mpeg4-generic/44100/2\r\n" +
|
||||
"a=fmtp:97 profile-level-id=1;mode=AAC-hbr;sizelength=13;indexlength=3;indexdeltalength=3;config=zzz1210\r\n" +
|
||||
"a=control:streamid=1\r\n"),
|
||||
"unable to parse track 1: invalid AAC config (zzz1210)",
|
||||
"unable to parse track 2: invalid AAC config (zzz1210)",
|
||||
},
|
||||
} {
|
||||
t.Run(ca.name, func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user