Skip to content

Commit

Permalink
fix bug: lastSample
Browse files Browse the repository at this point in the history
  • Loading branch information
caoyaping committed Mar 17, 2023
1 parent cfefffa commit 0cf3fb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion go-mp4/mp4muxer.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ func (muxer *Movmuxer) writeMoov(w io.Writer) (err error) {
moovsize := len(mvhd) + len(mvex)
traks := make([][]byte, len(muxer.tracks))
for i := uint32(1); i < muxer.nextTrackId; i++ {
if len(muxer.tracks[i].samplelist) == 0 {
if len(muxer.tracks[i].samplelist) == 0 && !muxer.tracks[i].lastSample.hasVcl {
continue
}
traks[i-1] = makeTrak(muxer.tracks[i], muxer.movFlag)
Expand Down

0 comments on commit 0cf3fb8

Please sign in to comment.