summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Krüger <krueger@lesspain.de>2012-07-12 10:24:59 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-12 20:18:03 +0200
commitc916af995d15bb1eb1329cb73fdb1c761433e601 (patch)
treecefbee109aa8a023dab2fdf1309f7b59e130985e
parentf7e26cca892cb764f821d564bdb8df43c7cbc766 (diff)
add output for frame timestamps
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--ffmpeg.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index cf53b91f0e..fe3e14ddfb 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -2500,6 +2500,16 @@ static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output)
if(best_effort_timestamp != AV_NOPTS_VALUE)
ist->next_pts = ist->pts = av_rescale_q(decoded_frame->pts = best_effort_timestamp, ist->st->time_base, AV_TIME_BASE_Q);
+ 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:%d best_effort_ts_time:%s keyframe:%d frame_type:%d \n",
+ ist->st->index, av_ts2str(decoded_frame->pts),
+ av_ts2timestr(decoded_frame->pts, &ist->st->time_base),
+ best_effort_timestamp,
+ av_ts2timestr(best_effort_timestamp, &ist->st->time_base),
+ decoded_frame->key_frame, decoded_frame->pict_type);
+ }
+
pkt->size = 0;
pre_process_video_frame(ist, (AVPicture *)decoded_frame, &buffer_to_free);