mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine SrsFragment.duration in time unit.
This commit is contained in:
parent
0879bef9b2
commit
bc1189caee
8 changed files with 109 additions and 29 deletions
|
@ -335,7 +335,7 @@ srs_error_t SrsDashController::on_audio(SrsSharedPtrMessage* shared_audio, SrsFo
|
|||
return refresh_init_mp4(shared_audio, format);
|
||||
}
|
||||
|
||||
if (acurrent->duration() >= int64_t(srsu2ms(fragment))) {
|
||||
if (acurrent->duration() >= fragment) {
|
||||
if ((err = acurrent->reap(audio_dts)) != srs_success) {
|
||||
return srs_error_wrap(err, "reap current");
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ srs_error_t SrsDashController::on_video(SrsSharedPtrMessage* shared_video, SrsFo
|
|||
return refresh_init_mp4(shared_video, format);
|
||||
}
|
||||
|
||||
bool reopen = format->video->frame_type == SrsVideoAvcFrameTypeKeyFrame && vcurrent->duration() >= int64_t(srsu2ms(fragment));
|
||||
bool reopen = format->video->frame_type == SrsVideoAvcFrameTypeKeyFrame && vcurrent->duration() >= fragment;
|
||||
if (reopen) {
|
||||
if ((err = vcurrent->reap(video_dts)) != srs_success) {
|
||||
return srs_error_wrap(err, "reap current");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue