fixed frame loss when time_jitter is off #2635
Closed
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.
Description'
Please ensure that the markdown structure is maintained.
4.0release branch
Please ensure that the markdown structure is maintained.
Please ensure that the markdown structure is maintained.
Replay
Please ensure that the markdown structure is maintained.
How to replay bug?
Please ensure that the markdown structure is maintained.
How to replay bug?
time_jitter
to off.ffplay
to play the stream. There is a noticeable audio-video desynchronization in the first 2 seconds, with the video playing slower.Please ensure that the markdown structure is maintained.
Problem
SrsMessageQueue
, if the cached frame duration inSrsMessageQueue
exceeds 30 seconds, the first frame (usually a video keyframe) will be discarded.time_jitter
to off. The timestamp of the sequence header (the first packet in the queue) is usually 0, and the timestamp of the subsequent GOP cache may already be greater than 30 seconds, resulting in frame loss.Please ensure that the markdown structure is maintained.
Fix
When calculating the accumulated duration of data in
SrsMessageQueue
, exclude the calculation of the sequence header.Please ensure that the markdown structure is maintained.
TRANS_BY_GPT3