Skip to content

Commit 14be615

Browse files
committed
apply no-offset workaround to offset clock type
1 parent 934a0b8 commit 14be615

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

app/src/main/java/org/akanework/gramophone/logic/utils/SemanticLyrics.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1148,6 +1148,10 @@ private class TtmlTimeTracker(private val parser: XmlPullParser, private val isA
11481148
"f" -> time /= effectiveFrameRate / 1000.0
11491149
"t" -> time /= tickRate / 1000.0
11501150
}
1151+
if (isApple) {
1152+
// Apple has no idea how a TTML file works. So omit frame offset just for their broken files
1153+
return (time.toLong() + (audioOffset ?: 0L)) * multiplier
1154+
}
11511155
return (time.toLong() + offset + (audioOffset ?: 0L)) * multiplier
11521156
}
11531157
throw XmlPullParserException("can't understand this TTML timestamp: $input")

0 commit comments

Comments
 (0)