Skip to content

Commit 84094f0

Browse files
committed
avfilter/avf_showcqt: use av_gettime_relative() instead of av_gettime()
av_gettime_relative() is using the monotonic clock therefore more suitable for relative time calculations. Signed-off-by: Marton Balint <[email protected]>
1 parent b69c91b commit 84094f0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libavfilter/avf_showcqt.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,11 +1133,11 @@ static int plot_cqt(AVFilterContext *ctx, AVFrame **frameout)
11331133
int64_t last_time, cur_time;
11341134

11351135
#define UPDATE_TIME(t) \
1136-
cur_time = av_gettime(); \
1136+
cur_time = av_gettime_relative(); \
11371137
t += cur_time - last_time; \
11381138
last_time = cur_time
11391139

1140-
last_time = av_gettime();
1140+
last_time = av_gettime_relative();
11411141

11421142
memcpy(s->fft_result, s->fft_data, s->fft_len * sizeof(*s->fft_data));
11431143
if (s->attack_data) {

0 commit comments

Comments
 (0)