Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vmap/decoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ func (adBreak *AdBreak) UnmarshalToken(tok *xmltokenizer.Tokenizer, se *xmltoken
case "VAST":
var vast VAST
if token.SelfClosing {
adBreak.AdSource.VASTData.VAST = &VAST{}
break
}
// Reuse Token object in the sync.Pool since we only use it temporarily.
Expand Down
1 change: 1 addition & 0 deletions vmap/structure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func TestDecodeVmapEmptyVast(t *testing.T) {
is.NoErr(err)

is.Equal(len(vmap.AdBreaks), 1)
is.Equal(len(vmap.AdBreaks[0].AdSource.VASTData.VAST.Ad), 0)
}

func TestDecodeEmptyVast(t *testing.T) {
Expand Down
Loading