diff options
author | wm4 <wm4@nowhere> | 2012-10-24 22:38:45 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2012-10-24 22:38:45 +0200 |
commit | 0e81d62c53a205ce5a4a5b201c283a1f9aba7316 (patch) | |
tree | 9ce8f4b0444a765c6a5dce3cb84c528a0e4ca3df /mplayer.c | |
parent | bcf447d7e82af814ccc07c852543be38e58d69c8 (diff) | |
parent | 60cbc9461b86b13c68cc9537bc9a124ddc07a399 (diff) | |
download | mpv-0e81d62c53a205ce5a4a5b201c283a1f9aba7316.tar.bz2 mpv-0e81d62c53a205ce5a4a5b201c283a1f9aba7316.tar.xz |
Merge branch 'master' into osd_changes
Conflicts:
libvo/vo_xv.c
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 22 |
1 files changed, 8 insertions, 14 deletions
@@ -1106,19 +1106,11 @@ static void print_status(struct MPContext *mpctx, double a_pos, bool at_frame) saddf(line, width, ":"); // Playback position - double cur = MP_NOPTS_VALUE; - if (mpctx->sh_audio && a_pos != MP_NOPTS_VALUE) { - cur = a_pos; - } else if (mpctx->sh_video && mpctx->video_pts != MP_NOPTS_VALUE) { - cur = mpctx->video_pts; - } - if (cur != MP_NOPTS_VALUE) { - saddf(line, width, " %.1f ", cur); - saddf(line, width, "("); - sadd_hhmmssff(line, width, cur, mpctx->opts.osd_fractions); - saddf(line, width, ")"); - } else - saddf(line, width, " ???"); + double cur = get_current_time(mpctx); + saddf(line, width, " %.1f ", cur); + saddf(line, width, "("); + sadd_hhmmssff(line, width, cur, mpctx->opts.osd_fractions); + saddf(line, width, ")"); double len = get_time_length(mpctx); if (len >= 0) { @@ -2845,7 +2837,9 @@ double get_current_time(struct MPContext *mpctx) double apts = playing_audio_pts(mpctx); if (apts != MP_NOPTS_VALUE) return apts; - return mpctx->last_seek_pts; + if (mpctx->last_seek_pts != MP_NOPTS_VALUE) + return mpctx->last_seek_pts; + return 0; } int get_percent_pos(struct MPContext *mpctx) |