summaryrefslogtreecommitdiffstats
path: root/player/osd.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-01-29 22:46:28 +0100
committerwm4 <wm4@nowhere>2016-01-29 22:46:28 +0100
commit526d578beee0fb6dc61e189bf2e185f688c9bef2 (patch)
tree5b30ef53077c400e141073f8a1cd77f82cd850a8 /player/osd.c
parentc00dc5c5c61ba185cc0e8698697cb9b365553a56 (diff)
downloadmpv-526d578beee0fb6dc61e189bf2e185f688c9bef2.tar.bz2
mpv-526d578beee0fb6dc61e189bf2e185f688c9bef2.tar.xz
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.
Diffstat (limited to 'player/osd.c')
-rw-r--r--player/osd.c3
1 files changed, 2 insertions, 1 deletions
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)