fix: subBoxStart偏移修正+标题分割扩展Unicode斜杠字符 (#1441) #1441
@@ -44,7 +44,7 @@ function findCodecConfig(buffer: ArrayBuffer, start: number, end: number): Array
|
||||
// 子 box 从 entryOffset + 8 + 6 + 2 + 16 + 2 + 2 + 2 + 2 + 4 + 2 + 2 + 2 + 2 = entryOffset + 78
|
||||
// 更简单的做法:扫描 entry 内的子 box
|
||||
const entryEnd = entryOffset + entrySize
|
||||
const subBoxStart = entryOffset + 8 + 70 // 跳过 header(8) + visual sample entry fixed fields(70)
|
||||
const subBoxStart = entryOffset + 8 + 68 // VisualSampleEntry 固定字段共 68 字节
|
||||
const result = findCodecConfig(buffer, subBoxStart, entryEnd)
|
||||
if (result) return result
|
||||
entryOffset += entrySize
|
||||
@@ -431,7 +431,7 @@ export function useCanvasPlayer(
|
||||
ctx.textAlign = "center"
|
||||
|
||||
// 按 "/" 分割为多行("/" 作为手动换行符)
|
||||
const lines = title.text.split(/[//]/)
|
||||
const lines = title.text.split(/[//⁄∕]/)
|
||||
const lineHeight = fontSize * 1.3
|
||||
const totalHeight = lines.length * lineHeight
|
||||
|
||||
|
||||
Reference in New Issue
Block a user