summaryrefslogtreecommitdiff
path: root/libavfilter/avf_showcqt.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2021-02-06 10:17:30 +0100
committerMarton Balint <cus@passwd.hu>2021-02-27 21:30:41 +0100
commit84094f017eba045dbb8643c1e0617c235e4f78df (patch)
treeabaac165d264de1697ae486c4d6c1f053b792293 /libavfilter/avf_showcqt.c
parentb69c91bbee4e07fe7ae0046fd3ddda37edee7035 (diff)
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 <cus@passwd.hu>
Diffstat (limited to 'libavfilter/avf_showcqt.c')
-rw-r--r--libavfilter/avf_showcqt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c
index 115174a9b4..dba1f089ee 100644
--- a/libavfilter/avf_showcqt.c
+++ b/libavfilter/avf_showcqt.c
@@ -1133,11 +1133,11 @@ static int plot_cqt(AVFilterContext *ctx, AVFrame **frameout)
int64_t last_time, cur_time;
#define UPDATE_TIME(t) \
- cur_time = av_gettime(); \
+ cur_time = av_gettime_relative(); \
t += cur_time - last_time; \
last_time = cur_time
- last_time = av_gettime();
+ last_time = av_gettime_relative();
memcpy(s->fft_result, s->fft_data, s->fft_len * sizeof(*s->fft_data));
if (s->attack_data) {