Repository navigation
Preserve fractional seconds in MEPlayerItem.duration - #931
Conversation
|
这个问题在lgpl分支已经修复了。改成 var duration = TimeInterval(max(formatCtx.pointee.duration, 0)) / TimeInterval(AV_TIME_BASE) 就可以了。你可以申请lgpl授权,就可以返回lgpl分支了。 |
|
Heads-up on the red The job fails after ~6-8 seconds, during checkout/setup — before any Swift code is compiled — and it fails identically on PRs that have nothing to do with mine, e.g. #927 ( This PR changes one expression in |
|
你的改动没有问题,只是我觉得这个改动太复杂了。只要改成下面这样就可以了。一行代码就解决了。 |
989e56b to
6be2eaa
Compare
MEPlayerItem.duration was truncated to whole seconds for media files with sub-second duration.
6be2eaa to
7396932
Compare
|
Simplified to the one-liner you suggested — the helper extension and its test are gone, and the duration line is now just: duration = TimeInterval(max(formatCtx.pointee.duration, 0)) / TimeInterval(AV_TIME_BASE)Dividing the clamped |
MEPlayerItem.duration was truncated to whole seconds, losing sub-second precision for short media files. Preserve the full Double/CMTime value.