aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2011-02-08 11:57:08 +0100
committerNicolas George <nicolas.george@normalesup.org>2011-02-11 18:59:52 +0100
commitd6705a27d8e681449ab2dbc68c6e7dd344160166 (patch)
treee9205a8a43bad64816d0cf6117015a1766e656b8
parentccba4f4c2532544d9cfc7b4e3f2a2bd89ac0ab04 (diff)
downloadffmpeg-d6705a27d8e681449ab2dbc68c6e7dd344160166.tar.gz
ffplay: stats: do not dereference NULL video
Also: cosmetic: split this overly long line
-rw-r--r--ffplay.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/ffplay.c b/ffplay.c
index ba7e48caf0..3dcca98049 100644
--- a/ffplay.c
+++ b/ffplay.c
@@ -1284,7 +1284,14 @@ retry:
if (is->audio_st && is->video_st)
av_diff = get_audio_clock(is) - get_video_clock(is);
printf("%7.2f A-V:%7.3f s:%3.1f aq=%5dKB vq=%5dKB sq=%5dB f=%"PRId64"/%"PRId64" \r",
- get_master_clock(is), av_diff, FFMAX(is->skip_frames-1, 0), aqsize / 1024, vqsize / 1024, sqsize, is->video_st->codec->pts_correction_num_faulty_dts, is->video_st->codec->pts_correction_num_faulty_pts);
+ get_master_clock(is),
+ av_diff,
+ FFMAX(is->skip_frames-1, 0),
+ aqsize / 1024,
+ vqsize / 1024,
+ sqsize,
+ is->video_st ? is->video_st->codec->pts_correction_num_faulty_dts : 0,
+ is->video_st ? is->video_st->codec->pts_correction_num_faulty_pts : 0);
fflush(stdout);
last_time = cur_time;
}