Add last_duration to warning about non increasing dts

pull/4202/head
Isaac Connor 2024-07-03 08:55:04 -04:00
parent 18ba1eb8c8
commit 90a64a5ae9
1 changed files with 2 additions and 2 deletions

View File

@ -1456,8 +1456,8 @@ int VideoStore::write_packet(AVPacket *pkt, AVStream *stream) {
} else {
if (last_dts[stream->index] != AV_NOPTS_VALUE) {
if (pkt->dts < last_dts[stream->index]) {
Warning("non increasing dts, fixing. our dts %" PRId64 " stream %d last_dts %" PRId64 ". reorder_queue_size=%zu",
pkt->dts, stream->index, last_dts[stream->index], reorder_queue_size);
Warning("non increasing dts, fixing. our dts %" PRId64 " stream %d last_dts %" PRId64 " last_duration %" PRId64 ". reorder_queue_size=%zu",
pkt->dts, stream->index, last_dts[stream->index], last_duration[stream->index], reorder_queue_size);
pkt->dts = last_dts[stream->index]+last_duration[stream->index];
if (pkt->dts > pkt->pts) pkt->pts = pkt->dts; // Do it here to avoid warning below
} else if (pkt->dts == last_dts[stream->index]) {