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

Don't drop first frame when recording to disk.

This commit is contained in:
Juliusz Chroboczek 2020-10-12 15:20:34 +02:00
parent c8de6620a7
commit 0c8df661b2

View file

@ -221,12 +221,22 @@ func newDiskConn(directory, label string, up conn.Up, remoteTracks []conn.UpTrac
var builder *samplebuilder.SampleBuilder
switch remote.Codec().Name {
case webrtc.Opus:
builder = samplebuilder.New(128, &codecs.OpusPacket{})
builder = samplebuilder.New(
16, &codecs.OpusPacket{},
samplebuilder.WithPartitionHeadChecker(
&codecs.OpusPartitionHeadChecker{},
),
)
case webrtc.VP8:
if conn.hasVideo {
return nil, errors.New("multiple video tracks not supported")
}
builder = samplebuilder.New(128, &codecs.VP8Packet{})
builder = samplebuilder.New(
128, &codecs.VP8Packet{},
samplebuilder.WithPartitionHeadChecker(
&codecs.VP8PartitionHeadChecker{},
),
)
conn.hasVideo = true
}
track := &diskTrack{