Merge pull request #51 from ericxtang/master

Fix write trailer bug
This commit is contained in:
Eric Tang 2018-10-21 20:22:02 -07:00 committed by GitHub
commit 3ddbc8f9d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -300,11 +300,12 @@ func CopyFile(dst av.Muxer, src av.Demuxer) (err error) {
return
}
if err = CopyPackets(dst, src); err != nil {
return
if err != io.EOF {
return
}
}
if err = dst.WriteTrailer(); err != nil {
return
}
return
}