nareix / joy4

Golang audio/video library and streaming server
MIT License
2.67k stars 499 forks source link

Fix write trailer bug #51

Closed ericxtang closed 5 years ago

ericxtang commented 6 years ago

CopyPackets returns io.EOF if we get to the end of the stream (via default assignment to err), so we should explicitly check for io.EOF in CopyFile. Otherwise we'll never get to WriteTrailer.