summaryrefslogtreecommitdiffstats
path: root/ffplay.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2013-05-11 13:37:25 +0200
committerMarton Balint <cus@passwd.hu>2013-06-01 12:50:45 +0200
commit5b492720ad90d6cbde2c3b5ae9dbafb8ef95f411 (patch)
tree71249e03165336034f084bf4dcea5a43f9d8f2c5 /ffplay.c
parentf2175a628b7975660774635e0b2d940855365ed5 (diff)
downloadffmpeg-streaming-5b492720ad90d6cbde2c3b5ae9dbafb8ef95f411.zip
ffmpeg-streaming-5b492720ad90d6cbde2c3b5ae9dbafb8ef95f411.tar.gz
ffplay: if playing only audio or video only, show the master clock diff in status line
Showing A-V diff has no use if there is no audio and video stream, but showing the audio or video clock difference to the master clock can be useful. Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'ffplay.c')
-rw-r--r--ffplay.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index 81c530e..3e85921 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1468,8 +1468,13 @@ display:
av_diff = 0;
if (is->audio_st && is->video_st)
av_diff = get_clock(&is->audclk) - get_clock(&is->vidclk);
- printf("%7.2f A-V:%7.3f fd=%4d aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r",
+ else if (is->video_st)
+ av_diff = get_master_clock(is) - get_clock(&is->vidclk);
+ else if (is->audio_st)
+ av_diff = get_master_clock(is) - get_clock(&is->audclk);
+ printf("%7.2f %s:%7.3f fd=%4d aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r",
get_master_clock(is),
+ (is->audio_st && is->video_st) ? "A-V" : (is->video_st ? "M-V" : (is->audio_st ? "M-A" : " ")),
av_diff,
is->frame_drops_early + is->frame_drops_late,
aqsize / 1024,
OpenPOWER on IntegriCloud