mirror of
https://github.com/mpv-player/mpv
synced 2025-01-03 13:32:16 +00:00
vo: get rid of config_count field
Doesn't really seem to be much of use. Get rid of the remaining uses of it. Concerning vo_opengl_old, it seems uninitGl() works fine even if called before initialization.
This commit is contained in:
parent
a8b267540e
commit
143cf79a96
@ -339,7 +339,6 @@ int vo_reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
||||
|
||||
int ret = vo->driver->reconfig(vo, vo->params, flags);
|
||||
vo->config_ok = ret >= 0;
|
||||
vo->config_count += vo->config_ok;
|
||||
if (vo->config_ok) {
|
||||
check_vo_caps(vo);
|
||||
} else {
|
||||
|
@ -230,7 +230,6 @@ struct vo_driver {
|
||||
struct vo {
|
||||
struct mp_log *log; // Using e.g. "[vo/vdpau]" as prefix
|
||||
int config_ok; // Last config call was successful?
|
||||
int config_count; // Total number of successful config calls
|
||||
struct mp_image_params *params; // Configured parameters (as in vo_reconfig)
|
||||
|
||||
bool probing;
|
||||
|
@ -69,10 +69,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
||||
struct priv *p = vo->priv;
|
||||
mp_image_unrefp(&p->current);
|
||||
|
||||
if (p->outdir && vo->config_count < 1)
|
||||
if (!checked_mkdir(vo, p->outdir))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -127,6 +123,9 @@ static void uninit(struct vo *vo)
|
||||
|
||||
static int preinit(struct vo *vo)
|
||||
{
|
||||
struct priv *p = vo->priv;
|
||||
if (p->outdir && !checked_mkdir(vo, p->outdir))
|
||||
return -1;
|
||||
vo->untimed = true;
|
||||
return 0;
|
||||
}
|
||||
|
@ -1731,7 +1731,6 @@ static int reconfig(struct vo *vo, struct mp_image_params *params, int flags)
|
||||
|
||||
p->vo_flipped = !!(flags & VOFLAG_FLIPPING);
|
||||
|
||||
if (vo->config_count)
|
||||
uninitGl(vo);
|
||||
|
||||
if (!config_window(vo, vo->dwidth, vo->dheight, flags))
|
||||
|
Loading…
Reference in New Issue
Block a user