aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/ffmpeg.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-04-07 11:03:37 +0200
committerAnton Khirnov <anton@khirnov.net>2023-04-13 15:34:07 +0200
commit95fa4edbd668971df7c815610b1c263793043e27 (patch)
treeec728268919b5f4b767b8fbe43074c8409cdf4ed /fftools/ffmpeg.c
parentbe3b1e27e5cb7a390ab1bfa2265d0b0e2f0bcbce (diff)
downloadffmpeg-95fa4edbd668971df7c815610b1c263793043e27.tar.gz
fftools/ffmpeg: improve decoder -ts_debug line
* log to the input stream log context * drop the now-duplicate index/type information * show pkt_dts and frame duration
Diffstat (limited to 'fftools/ffmpeg.c')
-rw-r--r--fftools/ffmpeg.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index d14ae62e86..379f6c73cd 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -1379,12 +1379,20 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_
}
if (debug_ts) {
- av_log(NULL, AV_LOG_INFO, "decoder -> ist_index:%d type:video "
- "frame_pts:%s frame_pts_time:%s best_effort_ts:%"PRId64" best_effort_ts_time:%s keyframe:%d frame_type:%d time_base:%d/%d\n",
- ist->st->index, av_ts2str(decoded_frame->pts),
+ av_log(ist, AV_LOG_INFO,
+ "decoder -> pts:%s pts_time:%s "
+ "pkt_dts:%s pkt_dts_time:%s "
+ "best_effort_ts:%"PRId64" best_effort_ts_time:%s "
+ "duration:%s duration_time:%s "
+ "keyframe:%d frame_type:%d time_base:%d/%d\n",
+ av_ts2str(decoded_frame->pts),
av_ts2timestr(decoded_frame->pts, &ist->st->time_base),
+ av_ts2str(decoded_frame->pkt_dts),
+ av_ts2timestr(decoded_frame->pkt_dts, &ist->st->time_base),
best_effort_timestamp,
av_ts2timestr(best_effort_timestamp, &ist->st->time_base),
+ av_ts2str(decoded_frame->duration),
+ av_ts2timestr(decoded_frame->duration, &ist->st->time_base),
decoded_frame->key_frame, decoded_frame->pict_type,
ist->st->time_base.num, ist->st->time_base.den);
}