Skip to content

Commit af2a4d5

Browse files
committed
fixed wrong code with shaka-packager
1 parent 480c3a5 commit af2a4d5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/shaka.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,17 @@ func (r *ShakaPackager) BuildAndValidate() ([]string, error) {
7474
validationErrors := []string{}
7575

7676
for i, stream := range r.StreamOptions {
77+
streamDescriptor := []string{}
7778
for j, opt := range stream.Options {
7879
if err := opt.Validate(); err != nil {
7980
validationErrors = append(validationErrors, fmt.Sprintf("stream[%d].option[%d]: %v", i, j, err))
8081
continue
8182
}
8283

83-
args = append(args, opt.Parse())
84+
streamDescriptor = append(streamDescriptor, opt.Parse())
8485
}
86+
87+
args = append(args, strings.Join(streamDescriptor, ","))
8588
}
8689

8790
for i, flag := range r.Flags.Flags {
@@ -144,4 +147,4 @@ func NewStreamDescriptor(opts ...StreamDescriptorFn) *StreamOptions {
144147

145148
func (s *StreamOptions) Add(option ShakaParser) {
146149
s.Options = append(s.Options, option)
147-
}
150+
}

0 commit comments

Comments
 (0)