Skip to content

Commit

Permalink
Add last_duration to warning about non increasing dts
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Connor committed Jul 3, 2024
1 parent aa1aee2 commit 1874c2b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/zm_videostore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,8 +1397,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]) {
Expand Down

0 comments on commit 1874c2b

Please sign in to comment.