From 526d578beee0fb6dc61e189bf2e185f688c9bef2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 29 Jan 2016 22:46:28 +0100 Subject: player: refactor: some more minor decoder/output decoupling These changes don't make too much sense without context, but are preparation for later. Then the audio_src/video_src fields will be actually be NULL under circumstances. --- player/osd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'player/osd.c') diff --git a/player/osd.c b/player/osd.c index 45db9b2c77..b88feee9f6 100644 --- a/player/osd.c +++ b/player/osd.c @@ -246,7 +246,8 @@ static void print_status(struct MPContext *mpctx) talloc_free(r); } int64_t c = vo_get_drop_count(mpctx->video_out); - int dropped_frames = mpctx->vo_chain->video_src->dropped_frames; + struct dec_video *d_video = mpctx->vo_chain->video_src; + int dropped_frames = d_video ? d_video->dropped_frames : 0; if (c > 0 || dropped_frames > 0) { saddf(&line, " Dropped: %"PRId64, c); if (dropped_frames) -- cgit v1.2.3