Skip to content

Commit

Permalink
- typo
Browse files Browse the repository at this point in the history
  • Loading branch information
igorshevach committed Nov 7, 2023
1 parent 820a605 commit 4762d7c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions transcoder/utils/throttler.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ getFrameRateFromMediaInfo(

static
int64_t calculateThrottleWindow(samples_stats_t *stats,AVRational targetFramerate){
// during startup frame rate is not stable and usually is high
// due to system delays related to various factors. therefore.
// we must work with high pressures in small intervals of time.
// In order to not overshoot we take smaller intervals proportional to
// time passed since beginning.
if(targetFramerate.den == 0) {
if(stats->dtsPassed < 90000) {
return av_rescale(1000*1000,stats->dtsPassed , 90000);
}
} else if(stats->totalFrames * targetFramerate.den < targetFramerate.num) {
// during startup frame rate is not stable and usually is high
// due to system delays related to various factors. therefore.
// we must work with high pressures in small intervals of time.
// In order to not overshoot we take smaller intervals proportional to
// time passed since beginning.
return av_rescale_q(1000*1000,
(AVRational){stats->totalFrames,1},
targetFramerate);
Expand Down

0 comments on commit 4762d7c

Please sign in to comment.