1 Star 0 Fork 5

guojunding/faad2

forked from src-openEuler/faad2 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-backport-Fix-gapless-calculation-in-frontend.patch 840 Bytes
一键复制 编辑 原始数据 按行查看 历史
guojunding 提交于 2024-07-30 10:35 . Fix gapless calculation in frontend
From 60fbce1deb150d7afbd419d79c2d70fd3f215109 Mon Sep 17 00:00:00 2001
From: Gavin Troy <gavin@cantlogout.com>
Date: Mon, 4 Mar 2024 20:35:21 +0000
Subject: [PATCH] Fix gapless calculation in frontend
Right side is evaluated first. samples and decoded are unsigned ints
which underflow to a very large number.
---
frontend/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/frontend/main.c b/frontend/main.c
index fadc5cb..fb98520 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -934,7 +934,7 @@ static int decodeMP4file(char *mp4file, char *sndfile, char *adts_fn, int to_std
decoded += dur;
if (decoded > mp4config.samples)
- dur += mp4config.samples - decoded;
+ dur -= decoded - mp4config.samples;
if (dur > framesize)
{
--
2.9.3.windows.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/guojunding/faad2.git
git@gitee.com:guojunding/faad2.git
guojunding
faad2
faad2
master

搜索帮助