diff options
author | wm4 <wm4@nowhere> | 2013-06-15 18:57:38 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-15 18:57:38 +0200 |
commit | 73b9b0b830b49d243a9b959fc5a8dc0351968f0c (patch) | |
tree | 7a9ccb76711c400fb78fe65e06bd4b2826f18679 /video/out/w32_common.c | |
parent | 63ff79556f16d41727efc3fccbb4b29dda791c0e (diff) | |
download | mpv-73b9b0b830b49d243a9b959fc5a8dc0351968f0c.tar.bz2 mpv-73b9b0b830b49d243a9b959fc5a8dc0351968f0c.tar.xz |
w32_common: remove some unneeded code
vo_w32_init() can be called only once on a VO.
Diffstat (limited to 'video/out/w32_common.c')
-rw-r--r-- | video/out/w32_common.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 41b8855c20..e97a9e2e85 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -570,12 +570,10 @@ int vo_w32_config(struct vo *vo, uint32_t width, uint32_t height, */ int vo_w32_init(struct vo *vo) { - struct vo_w32_state *w32 = vo->w32; - if (w32 && w32->window) - return 1; + assert(!vo->w32); - if (!w32) - w32 = vo->w32 = talloc_zero(vo, struct vo_w32_state); + struct vo_w32_state *w32 = talloc_zero(vo, struct vo_w32_state); + vo->w32 = w32; HINSTANCE hInstance = GetModuleHandleW(NULL); |