1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-09 18:25:58 +01:00

Increase the size of the diskwriter's reordering buffer.

This must be larger than the samplebuilder's MaxLate.
This commit is contained in:
Juliusz Chroboczek 2022-03-21 23:38:09 +01:00
parent a2ce703512
commit a183ac4bcd

View file

@ -634,11 +634,22 @@ func (conn *diskConn) initWriter(width, height uint32) error {
return err return err
} }
interceptor, err := mkvcore.NewMultiTrackBlockSorter(
// must be larger than the samplebuilder's MaxLate.
mkvcore.WithMaxDelayedPackets(384),
mkvcore.WithSortRule(mkvcore.BlockSorterDropOutdated),
)
if err != nil {
conn.file.Close()
conn.file = nil
return err
}
ws, err := mkvcore.NewSimpleBlockWriter( ws, err := mkvcore.NewSimpleBlockWriter(
conn.file, desc, conn.file, desc,
mkvcore.WithEBMLHeader(header), mkvcore.WithEBMLHeader(header),
mkvcore.WithSegmentInfo(webm.DefaultSegmentInfo), mkvcore.WithSegmentInfo(webm.DefaultSegmentInfo),
mkvcore.WithBlockInterceptor(webm.DefaultBlockInterceptor), mkvcore.WithBlockInterceptor(interceptor),
) )
if err != nil { if err != nil {
conn.file.Close() conn.file.Close()