mirror of
https://github.com/langhuihui/monibuca.git
synced 2025-12-24 13:48:04 +08:00
fix: udta write
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user