From 15a3bad4abca691d6459821bbcaf4c4f52a52f28 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Tue, 14 Nov 2023 09:33:59 +0100 Subject: [PATCH] Log PTS fixing at debug level Audio PTS are retrieved by AudioRecord.getTimestamp(), so they do not necessarily exactly match the number of samples (this allows to take drift and lag into account). As a consequence, two consecutive timestamps in microseconds may sometimes end up within the same millisecond, causing the warning. This is particularly true for the Matroska muxer which uses a timebase of 1/1000 (1 ms precision). Since this 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 8794442b..c9d5f131 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;