aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mux.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-20 17:29:20 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-20 17:36:36 +0200
commitd4cf377947d6d762476e9d3524516461f8881b1b (patch)
tree47dcb5bcaef4028f4941a26ae0416e22d4f2a8e1 /libavformat/mux.c
parente48a0a6c3fda652954b9951c563f3cc551541021 (diff)
downloadffmpeg-d4cf377947d6d762476e9d3524516461f8881b1b.tar.gz
avformat/mux: Place timestamp related trace av_logs under FF_FDEBUG_TS
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r--libavformat/mux.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 58dfad03e2..91019254fa 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -442,7 +442,8 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt)
int num, den, i;
int frame_size;
- av_log(s, AV_LOG_TRACE, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
+ if (s->debug & FF_FDEBUG_TS)
+ av_log(s, AV_LOG_TRACE, "compute_pkt_fields2: pts:%s dts:%s cur_dts:%s b:%d size:%d st:%d\n",
av_ts2str(pkt->pts), av_ts2str(pkt->dts), av_ts2str(st->cur_dts), delay, pkt->size, pkt->stream_index);
if (pkt->duration < 0 && st->codec->codec_type != AVMEDIA_TYPE_SUBTITLE) {
@@ -502,8 +503,10 @@ static int compute_pkt_fields2(AVFormatContext *s, AVStream *st, AVPacket *pkt)
return AVERROR(EINVAL);
}
- av_log(s, AV_LOG_TRACE, "av_write_frame: pts2:%s dts2:%s\n",
+ if (s->debug & FF_FDEBUG_TS)
+ av_log(s, AV_LOG_TRACE, "av_write_frame: pts2:%s dts2:%s\n",
av_ts2str(pkt->pts), av_ts2str(pkt->dts));
+
st->cur_dts = pkt->dts;
st->pts.val = pkt->dts;
@@ -876,8 +879,10 @@ int av_interleaved_write_frame(AVFormatContext *s, AVPacket *pkt)
if (pkt) {
AVStream *st = s->streams[pkt->stream_index];
- av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
+ if (s->debug & FF_FDEBUG_TS)
+ av_log(s, AV_LOG_TRACE, "av_interleaved_write_frame size:%d dts:%s pts:%s\n",
pkt->size, av_ts2str(pkt->dts), av_ts2str(pkt->pts));
+
if ((ret = compute_pkt_fields2(s, st, pkt)) < 0 && !(s->oformat->flags & AVFMT_NOTIMESTAMPS))
goto fail;