fix: udta write

This commit is contained in:
langhuihui
2025-04-27 11:07:58 +08:00
parent 8ca001e74c
commit cf604cadc6
2 changed files with 2 additions and 10 deletions

View File

@@ -50,15 +50,7 @@ func CreateStreamPathBox(streamPath string) *StreamPathBox {
// WriteTo writes the UserDataBox to the given writer
func (box *UserDataBox) WriteTo(w io.Writer) (n int64, err error) {
for _, entry := range box.Entries {
var nn int64
nn, err = entry.WriteTo(w)
n += nn
if err != nil {
return
}
}
return
return WriteTo(w, box.Entries...)
}
// Unmarshal parses the given buffer into a UserDataBox

View File

@@ -360,7 +360,7 @@ func (p *Publisher) WriteVideo(data IAVFrame) (err error) {
var idr *util.Ring[AVFrame]
if t.IDRingList.Len() > 0 {
idr = t.IDRingList.Back().Value
if t.CheckIfNeedDropFrame(p.MaxFPS) {
if p.Speed != 1 && t.CheckIfNeedDropFrame(p.MaxFPS) {
p.dropAfterTs = t.LastTs
return ErrSkip
} else {