>From 0e5df74cca50434f2e2c232cb4f8cbb26a082bec Mon Sep 17 00:00:00 2001
From: Stefano Sabatini <stefasab@gmail.com>
Date: Tue, 17 Jan 2012 17:13:41 +0100
Subject: [PATCH] ffmpeg: use tsutils.h utils for timestamp-related debugging
 commented code in transcode()

---
 ffmpeg.c |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 1b4ded9..61f6d6d 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -49,6 +49,7 @@
 #include "libavutil/avstring.h"
 #include "libavutil/libm.h"
 #include "libavutil/imgutils.h"
+#include "libavutil/tsutils.h"
 #include "libavformat/os_support.h"
 #include "libswresample/swresample.h"
 
@@ -2990,10 +2991,12 @@ static int transcode(OutputFile *output_files, int nb_output_files,
         if (pkt.dts != AV_NOPTS_VALUE)
             pkt.dts *= ist->ts_scale;
 
-        //fprintf(stderr, "next:%"PRId64" dts:%"PRId64" off:%"PRId64" %d\n",
-        //        ist->next_pts,
-        //        pkt.dts, input_files[ist->file_index].ts_offset,
-        //        ist->st->codec->codec_type);
+        //fprintf(stderr, "ist_index:%d type:%s next_pts:%s next_pts_time:%s pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_pts_time:%s off:%"PRId64"\n",
+        //        ist_index, av_get_media_type_string(ist->st->codec->codec_type),
+        //        av_ts2str(ist->next_pts), av_time2str(ist->next_pts, &ist->st->time_base),
+        //        av_ts2str(pkt.pts), av_time2str(pkt.pts, &ist->st->time_base),
+        //        av_ts2str(pkt.dts), av_time2str(pkt.dts, &ist->st->time_base), input_files[ist->file_index].ts_offset);
+
         if (pkt.dts != AV_NOPTS_VALUE && ist->next_pts != AV_NOPTS_VALUE
             && (is->iformat->flags & AVFMT_TS_DISCONT)) {
             int64_t pkt_dts = av_rescale_q(pkt.dts, ist->st->time_base, AV_TIME_BASE_Q);
-- 
1.7.5.4

