diff options
author | wm4 <wm4@nowhere> | 2014-05-06 00:21:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-05-06 00:21:15 +0200 |
commit | 143cf79a960625e8f1b623020987c0b7aa81a0f2 (patch) | |
tree | 1296bac9e0680d3c858e3a8b1595c23417299b64 /video | |
parent | a8b267540ecca0fa7d136078c7b84e2c6cd87e06 (diff) | |
download | mpv-143cf79a960625e8f1b623020987c0b7aa81a0f2.tar.bz2 mpv-143cf79a960625e8f1b623020987c0b7aa81a0f2.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo.c | 1 | ||||
-rw-r--r-- | video/out/vo.h | 1 | ||||
-rw-r--r-- | video/out/vo_image.c | 7 | ||||
-rw-r--r-- | video/out/vo_opengl_old.c | 3 |
4 files changed, 4 insertions, 8 deletions
diff --git a/video/out/vo.c b/video/out/vo.c index a13922534e..c681fa71a0 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -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 { diff --git a/video/out/vo.h b/video/out/vo.h index 77382d9f38..8ee53f9420 100644 --- a/video/out/vo.h +++ b/video/out/vo.h @@ -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; diff --git a/video/out/vo_image.c b/video/out/vo_image.c index 6c518655ad..b82adbba54 100644 --- a/video/out/vo_image.c +++ b/video/out/vo_image.c @@ -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; } diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c index 09945e9b54..5c9a64f4f2 100644 --- a/video/out/vo_opengl_old.c +++ b/video/out/vo_opengl_old.c @@ -1731,8 +1731,7 @@ 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); + uninitGl(vo); if (!config_window(vo, vo->dwidth, vo->dheight, flags)) return -1; |