From dfe2f55ebe79ab28521003d77a3307a7bb5ac3da Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 20 Oct 2019 13:50:24 -0400 Subject: [PATCH] More debugging to figure out #2720 --- src/zm_videostore.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index 26fa09736..57d7d9a0f 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -900,6 +900,7 @@ int VideoStore::writeVideoFramePacket(AVPacket *ipkt) { opkt.dts = ipkt->dts - video_first_dts; } else { opkt.dts = video_next_dts ? av_rescale_q(video_next_dts, video_out_stream->time_base, video_in_stream->time_base) : 0; + Debug(3, "Setting dts to video_next_dts %" PRId64 " from %" PRId64, opkt.dts, video_next_dts); } if ( ipkt->pts != AV_NOPTS_VALUE ) { opkt.pts = ipkt->pts - video_first_dts; @@ -911,6 +912,8 @@ int VideoStore::writeVideoFramePacket(AVPacket *ipkt) { dumpPacket(video_out_stream, &opkt, "after pts adjustment"); write_packet(&opkt, video_out_stream); video_next_dts = opkt.dts + opkt.duration; + Debug(3, "video_next_dts has become %" PRId64, video_next_dts); + zm_av_packet_unref(&opkt); return 0;