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.
wav.6
Romain Vimont 6 months ago
parent ef9dc85da4
commit 5c2f134292

@ -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;

Loading…
Cancel
Save