mirror of https://github.com/mpv-player/mpv
player: remove unneeded call
print_status() is called at a later point anyway (and before sleeping),
so this code has little effect. This code was added in commit a4f7a3df5
,
and I can't observe any problems with idle mode anymore.
Now print_status() is called from a single place only, within osd.c.
This commit is contained in:
parent
0cee4498f1
commit
eb2924054f
|
@ -434,7 +434,6 @@ void update_window_title(struct MPContext *mpctx, bool force);
|
||||||
void stream_dump(struct MPContext *mpctx);
|
void stream_dump(struct MPContext *mpctx);
|
||||||
|
|
||||||
// osd.c
|
// osd.c
|
||||||
void print_status(struct MPContext *mpctx);
|
|
||||||
void set_osd_bar(struct MPContext *mpctx, int type, const char* name,
|
void set_osd_bar(struct MPContext *mpctx, int type, const char* name,
|
||||||
double min, double max, double neutral, double val);
|
double min, double max, double neutral, double val);
|
||||||
void set_osd_msg(struct MPContext *mpctx, int level, int time,
|
void set_osd_msg(struct MPContext *mpctx, int level, int time,
|
||||||
|
|
|
@ -146,7 +146,7 @@ static void add_term_osd_bar(struct MPContext *mpctx, char **line, int width)
|
||||||
saddf(line, "%.*s", BSTR_P(parts[4]));
|
saddf(line, "%.*s", BSTR_P(parts[4]));
|
||||||
}
|
}
|
||||||
|
|
||||||
void print_status(struct MPContext *mpctx)
|
static void print_status(struct MPContext *mpctx)
|
||||||
{
|
{
|
||||||
struct MPOpts *opts = mpctx->opts;
|
struct MPOpts *opts = mpctx->opts;
|
||||||
|
|
||||||
|
|
|
@ -71,10 +71,6 @@ void pause_player(struct MPContext *mpctx)
|
||||||
if (mpctx->video_out)
|
if (mpctx->video_out)
|
||||||
vo_set_paused(mpctx->video_out, true);
|
vo_set_paused(mpctx->video_out, true);
|
||||||
|
|
||||||
// Only print status if there's actually a file being played.
|
|
||||||
if (mpctx->num_sources)
|
|
||||||
print_status(mpctx);
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
mp_notify(mpctx, mpctx->opts->pause ? MPV_EVENT_PAUSE : MPV_EVENT_UNPAUSE, 0);
|
mp_notify(mpctx, mpctx->opts->pause ? MPV_EVENT_PAUSE : MPV_EVENT_UNPAUSE, 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue