fix(ncm §33): 流媒专项批六项——流式SIGSEGV防御日志/档位保真(无损级必须flac+显示档按实际)/封面4xx不重试/收藏显隐/缓存命名迁移/topbar位图图标
- §2① ncm_api.c level_attempt: 无损级(hires/lossless及以上)命中必须 type=flac,返回 mp3 视为该档不可用续降 (修「hires 档静默给 mp3 被当命中」) - §2② player_manager.c eff_level_for_resp: 显示档按响应实际格式/码率——mp3 绝不显示 Hi-Res(≤128k→标准, 否则极高), flac 采信链 eff; br 未知钳 ≤EXHIGH - §1 流式 SIGSEGV(《十面埋伏》sig=11) 审计+UBSAN 探针未复现 → 落地防御日志(dl start/done/interrupt + play done fin/exp/fail/underrun) - §3 cover.c: download_cover 回填 rc/status; 确定性 4xx(404等)不重试立即跳下一张, 仅瞬时错误退避(rc=%d status=%d 日志) - §4 playlist.c: pl_show_fav 我创建(is_collected==0)隐藏收藏钮, 我收藏保留, 搜索歌单保守显示(评论槽并入无空洞) - §5 ncm_cache.c 双点→单点迁移 + player_manager song_local_file 旧键→当前档位键(不重下) - §6 home.c: topbar 动作 ⚙↻⌕ 迁移 sb_icons 位图(meow_topappbar_set_item_icon, 修 4k 字库豆腐) - 测试: test_ncm_core 新 test_grade_flac_gate + test_cache 双点迁移断言; degrade_sim/player_flow_sim 桩 flac 化 - 验证: stream/player_flow/window/search/cache_evict/degrade sim 全 PASS + test_ncm_core host+mipsel(qemu) + mem_sim + build_ncm.sh 0 warning - 新 ncm md5 cb818786 (text 1017110/bss 1362500), 未部署留主会话; 0 真实 NCM 业务请求
This commit is contained in:
1 parent
68ce46a5d8
commit
44a790dc1d
13 files changed
+425
-24
No files matched your search
@@ -41,7 +41,12 @@ static int fake_try(const char *dev, const char *ck, const char *id, int level,
|
||||
if (level > g_avail_from) return NCM_OK; /* 该档不可用:url 空 */
|
||||
snprintf(out->url, sizeof out->url, "http://sim/%lld.%s", (long long)12345,
|
||||
(level >= NCM_LEVEL_LOSSLESS) ? "flac" : "mp3");
|
||||
snprintf(out->type, sizeof out->type, "%s", g_type);
|
||||
/* §2① 档位保真:无损级及以上,服务端 encodeType=flac → 应答 type=flac(真实);g_type=""
|
||||
* (缺失)时保留空串,交给 level_attempt 按 url 扩展名推断(测试该推断路径)。 */
|
||||
if (level >= NCM_LEVEL_LOSSLESS && g_type[0])
|
||||
snprintf(out->type, sizeof out->type, "flac");
|
||||
else
|
||||
snprintf(out->type, sizeof out->type, "%s", g_type);
|
||||
if (g_resp_level) snprintf(out->level, sizeof out->level, "%s", g_resp_level);
|
||||
out->br = 320000;
|
||||
out->size = 9000000;
|
||||
|
||||
Reference in new issue
Block a user