Skip to content

Commit

Permalink
fixed frame loss when time_jitter is off
Browse files Browse the repository at this point in the history
  • Loading branch information
fengyifan committed Sep 26, 2021
1 parent 81fa762 commit 63549f2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion trunk/src/app/srs_app_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ srs_error_t SrsMessageQueue::enqueue(SrsSharedPtrMessage* msg, bool* is_overflow

msgs.push_back(msg);

if (msg->is_av()) {
// maybe the SH timestamp much short than A/V packet,
// shrink does not contain SH
if ((msg->is_audio() && !SrsFlvAudio::sh(msg->payload, msg->size)) || (msg->is_video() && !SrsFlvVideo::sh(msg->payload, msg->size))) {
if (av_start_time == -1) {
av_start_time = srs_utime_t(msg->timestamp * SRS_UTIME_MILLISECONDS);
}
Expand Down

0 comments on commit 63549f2

Please sign in to comment.