From 5c2f13429270836f6b9993b27e1222d3f592a545 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 14 Nov 2023 09:33:59 +0100 Subject: [PATCH] Log PTS fixing in debug mode Audio PTS are retrieved by AudioRecord.getTimestamp(), so they do not necessarily match exactly the number of samples (this allows to take drift and lag into account). In particular, the Matroska muxer uses a timebase of 1/1000 (1 ms precision), so two consecutive timestamps in microseconds may sometimes end up within the same millisecond, causing the warning. Since it is "expected", lower the log level from warning to debug. --- app/src/recorder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/recorder.c b/app/src/recorder.c index b1101cbe..d9d4d9ad 100644 --- a/app/src/recorder.c +++ b/app/src/recorder.c @@ -105,7 +105,7 @@ sc_recorder_write_stream(struct sc_recorder *recorder, AVStream *stream = recorder->ctx->streams[st->index]; sc_recorder_rescale_packet(stream, packet); if (st->last_pts != AV_NOPTS_VALUE && packet->pts <= st->last_pts) { - LOGW("Fixing PTS non monotonically increasing in stream %d " + LOGD("Fixing PTS non monotonically increasing in stream %d " "(%" PRIi64 " >= %" PRIi64 ")", st->index, st->last_pts, packet->pts); packet->pts = ++st->last_pts;