This commit is contained in:
Alex Eidt 2022-09-13 23:02:38 -07:00
parent 538bcb7a83
commit c9bc141f27
4 changed files with 21 additions and 8 deletions

View file

@ -280,6 +280,7 @@ func (writer *VideoWriter) init() error {
return err
}
writer.pipe = &pipe
if err := cmd.Start(); err != nil {
return err
}
@ -295,6 +296,7 @@ func (writer *VideoWriter) Write(frame []byte) error {
return err
}
}
total := 0
for total < len(frame) {
n, err := (*writer.pipe).Write(frame[total:])
@ -303,6 +305,7 @@ func (writer *VideoWriter) Write(frame []byte) error {
}
total += n
}
return nil
}