From 7490a0aeaf74f1fa7a99960cb0f1d775a1f6c0b4 Mon Sep 17 00:00:00 2001 From: qydysky Date: Tue, 31 Oct 2023 22:37:33 +0800 Subject: [PATCH] =?utf8?q?Improve=20fmp4=20=E8=B0=83=E6=95=B4=E6=97=B6?= =?utf8?q?=E9=97=B4=E6=88=B3=E9=81=BF=E5=85=8D=E5=9B=9E=E6=BA=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Reply/fmp4Decode.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Reply/fmp4Decode.go b/Reply/fmp4Decode.go index 21e5620..9a4a5d1 100644 --- a/Reply/fmp4Decode.go +++ b/Reply/fmp4Decode.go @@ -4,7 +4,6 @@ import ( "bytes" "errors" "io" - "math" "github.com/dustin/go-humanize" F "github.com/qydysky/bili_danmu/F" @@ -330,7 +329,7 @@ func (t *Fmp4Decoder) Search_stream_fmp4(buf []byte, keyframe *slice.Buf[byte]) } //sync audio timeStamp - if diff := math.Abs(audio.getT() - video.getT()); diff > 0.00001 { + if diff := video.getT() - audio.getT(); diff > 0.00001 { date := F.Itob64(int64(video.getT() * float64(audio.firstTimeStamp))) copy(audio.data, date) } -- 2.39.2