diff options
Diffstat (limited to 'player/osd.c')
-rw-r--r-- | player/osd.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/player/osd.c b/player/osd.c index da1fb41521..8912873368 100644 --- a/player/osd.c +++ b/player/osd.c @@ -23,7 +23,7 @@ #include <assert.h> #include "config.h" -#include "talloc.h" +#include "mpv_talloc.h" #include "common/msg.h" #include "common/msg_control.h" @@ -39,6 +39,7 @@ #include "stream/stream.h" #include "sub/osd.h" +#include "video/decode/dec_video.h" #include "video/out/vo.h" #include "core.h" @@ -196,7 +197,7 @@ static void print_status(struct MPContext *mpctx) if (mpctx->d_audio) saddf(&line, "A"); - if (mpctx->d_video) + if (mpctx->vo_chain) saddf(&line, "V"); saddf(&line, ": "); @@ -216,7 +217,7 @@ static void print_status(struct MPContext *mpctx) saddf(&line, " x%4.2f", opts->playback_speed); // A-V sync - if (mpctx->d_audio && mpctx->d_video && mpctx->sync_audio_to_video) { + if (mpctx->d_audio && mpctx->vo_chain && mpctx->sync_audio_to_video) { saddf(&line, " A-V:%7.3f", mpctx->last_av_difference); if (fabs(mpctx->total_avsync_change) > 0.05) saddf(&line, " ct:%7.3f", mpctx->total_avsync_change); @@ -234,7 +235,7 @@ static void print_status(struct MPContext *mpctx) #endif { // VO stats - if (mpctx->d_video) { + if (mpctx->vo_chain) { if (mpctx->display_sync_active) { char *r = mp_property_expand_string(mpctx, "${vsync-ratio}"); saddf(&line, " DS: %s/%"PRId64, r, @@ -242,10 +243,11 @@ static void print_status(struct MPContext *mpctx) talloc_free(r); } int64_t c = vo_get_drop_count(mpctx->video_out); - if (c > 0 || mpctx->dropped_frames_total > 0) { + int dropped_frames = mpctx->vo_chain->video_src->dropped_frames; + if (c > 0 || dropped_frames > 0) { saddf(&line, " Dropped: %"PRId64, c); - if (mpctx->dropped_frames_total) - saddf(&line, "/%d", mpctx->dropped_frames_total); + if (dropped_frames) + saddf(&line, "/%d", dropped_frames); } } } |