[FFmpeg-cvslog] lavf/segment: extend PTS debugging log with -reset_timestamps

Stefano Sabatini git at videolan.org
Wed Feb 6 00:40:46 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Tue Feb  5 12:25:24 2013 +0100| [a12787960e47e6c6bc9828045da5b8b8db56738d] | committer: Stefano Sabatini

lavf/segment: extend PTS debugging log with -reset_timestamps

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a12787960e47e6c6bc9828045da5b8b8db56738d
---

 libavformat/segment.c |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/libavformat/segment.c b/libavformat/segment.c
index 9c271eb..4ae2019 100644
--- a/libavformat/segment.c
+++ b/libavformat/segment.c
@@ -679,9 +679,12 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
     }
 
     if (seg->reset_timestamps) {
-        av_log(s, AV_LOG_DEBUG, "start_pts:%s pts:%s start_dts:%s dts:%s",
-               av_ts2timestr(seg->cur_entry.start_pts, &AV_TIME_BASE_Q), av_ts2timestr(pkt->pts, &st->time_base),
-               av_ts2timestr(seg->cur_entry.start_dts, &AV_TIME_BASE_Q), av_ts2timestr(pkt->dts, &st->time_base));
+        av_log(s, AV_LOG_DEBUG, "stream:%d start_pts_time:%s pts:%s pts_time:%s start_dts_time:%s dts:%s dts_time:%s",
+               pkt->stream_index,
+               av_ts2timestr(seg->cur_entry.start_pts, &AV_TIME_BASE_Q),
+               av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
+               av_ts2timestr(seg->cur_entry.start_dts, &AV_TIME_BASE_Q),
+               av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base));
 
         /* compute new timestamps */
         if (pkt->pts != AV_NOPTS_VALUE)
@@ -689,8 +692,9 @@ static int seg_write_packet(AVFormatContext *s, AVPacket *pkt)
         if (pkt->dts != AV_NOPTS_VALUE)
             pkt->dts -= av_rescale_q(seg->cur_entry.start_dts, AV_TIME_BASE_Q, st->time_base);
 
-        av_log(s, AV_LOG_DEBUG, " -> pts:%s dts:%s\n",
-               av_ts2timestr(pkt->pts, &st->time_base), av_ts2timestr(pkt->dts, &st->time_base));
+        av_log(s, AV_LOG_DEBUG, " -> pts:%s pts_time:%s dts:%s dts_time:%s\n",
+               av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &st->time_base),
+               av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &st->time_base));
     }
 
     ret = ff_write_chained(oc, pkt->stream_index, pkt, s);



More information about the ffmpeg-cvslog mailing list