mirror of
https://github.com/jech/galene.git
synced 2024-11-22 08:35:57 +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:
parent
a2ce703512
commit
a183ac4bcd
1 changed files with 12 additions and 1 deletions
|
@ -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()
|
||||||
|
|
Loading…
Reference in a new issue