fix(a/v-sync): use monotonic clock for audio PTS to fix desync#483
Merged
Merged
Conversation
Audio PTS was derived from the hardware device timestamp while video PTS used CLOCK_MONOTONIC, causing progressive A/V drift. Unify both to ns_time_monotonic(). Also preserve original_pts for the muxer to avoid precision loss from audio codec time_base rescaling. log: fix bug Bug:https://pms.uniontech.com/bug-view-363537.html
deepin pr auto review代码审查意见总体评价这个代码修改主要涉及音频处理、编码和时间戳管理方面。整体来看,修改是为了改进时间戳处理的准确性和可靠性,引入了系统单调时钟来替代之前可能不稳定的音频缓冲区时间戳。 具体分析1. 时间戳处理改进 (camview.c)
2. 编码器上下文修改 (encoder.c)
3. 头文件修改 (gviewencoder.h)
4. 多路复用器修改 (muxer.c)
性能考虑
安全性考虑
总体建议
这些修改整体上是积极的,提高了时间戳处理的准确性和可靠性,但还需要进一步完善错误处理和文档注释。 |
max-lvs
approved these changes
Jun 8, 2026
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LiHua000, max-lvs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/merge |
Contributor
|
This pr cannot be merged! (status: unstable) |
Contributor
Author
|
/forcemerge |
Contributor
|
This pr force merged! (status: unstable) |
12ff976
into
linuxdeepin:release/eagle
21 of 22 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audio PTS was derived from the hardware device timestamp while video PTS
used CLOCK_MONOTONIC, causing progressive A/V drift. Unify both to
ns_time_monotonic(). Also preserve original_pts for the muxer to avoid
precision loss from audio codec time_base rescaling.
log: fix bug
Bug:https://pms.uniontech.com/bug-view-363537.html