Skip to content

Commit

Permalink
Fix test for EXTINF check
Browse files Browse the repository at this point in the history
The empty segment uri is forbidden by RFC. I add something reasonable.
  • Loading branch information
khenarghot committed Oct 4, 2023
1 parent 345ded1 commit f8dd132
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ func TestDecodeMediaPlaylistExtInfNonStrict2(t *testing.T) {
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:0
%s
path
`

tests := []struct {
Expand Down Expand Up @@ -383,6 +384,7 @@ func TestDecodeMediaPlaylistExtInfNonStrict2(t *testing.T) {
if err != nil {
t.Errorf("unexpected error: %v", err)
}
test.wantSegment.URI = "path"
if !reflect.DeepEqual(p.Segments[0], test.wantSegment) {
t.Errorf("\nhave: %+v\nwant: %+v", p.Segments[0], test.wantSegment)
}
Expand Down

0 comments on commit f8dd132

Please sign in to comment.