diff options
Diffstat (limited to 'player/osd.c')
-rw-r--r-- | player/osd.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/player/osd.c b/player/osd.c index 8912873368..2a09911ac7 100644 --- a/player/osd.c +++ b/player/osd.c @@ -195,7 +195,7 @@ static void print_status(struct MPContext *mpctx) saddf(&line, "(Paused) "); } - if (mpctx->d_audio) + if (mpctx->ao_chain) saddf(&line, "A"); if (mpctx->vo_chain) saddf(&line, "V"); @@ -217,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->vo_chain && mpctx->sync_audio_to_video) { + if (mpctx->ao_chain && mpctx->vo_chain && !mpctx->vo_chain->is_coverart) { 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); @@ -237,13 +237,17 @@ static void print_status(struct MPContext *mpctx) // VO stats if (mpctx->vo_chain) { if (mpctx->display_sync_active) { - char *r = mp_property_expand_string(mpctx, "${vsync-ratio}"); - saddf(&line, " DS: %s/%"PRId64, r, - vo_get_delayed_count(mpctx->video_out)); + char *r = mp_property_expand_string(mpctx, + "${?vsync-ratio:${vsync-ratio}}"); + if (r[0]) { + saddf(&line, " DS: %s/%"PRId64, r, + vo_get_delayed_count(mpctx->video_out)); + } 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) @@ -463,13 +467,11 @@ static void add_seek_osd_messages(struct MPContext *mpctx) "Chapter: %s", chapter); talloc_free(chapter); } - if ((mpctx->add_osd_seek_info & OSD_SEEK_INFO_EDITION) - && mpctx->master_demuxer) - { + if ((mpctx->add_osd_seek_info & OSD_SEEK_INFO_EDITION) && mpctx->demuxer) { set_osd_msg(mpctx, 1, mpctx->opts->osd_duration, "Playing edition %d of %d.", - mpctx->master_demuxer->edition + 1, - mpctx->master_demuxer->num_editions); + mpctx->demuxer->edition + 1, + mpctx->demuxer->num_editions); } if (mpctx->add_osd_seek_info & OSD_SEEK_INFO_CURRENT_FILE) { if (mpctx->filename) { |