summaryrefslogtreecommitdiffstats
path: root/libvo/vo_xv.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-20 06:04:10 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-23 13:41:06 +0300
commit1ebfddd812230d641d934d312646638dd7091ba9 (patch)
tree6622aed369231b19011cafe99a312a8ff3bb126b /libvo/vo_xv.c
parent95a909b4fd758c16ed1fb1449fa7294d9c44ab91 (diff)
downloadmpv-1ebfddd812230d641d934d312646638dd7091ba9.tar.bz2
mpv-1ebfddd812230d641d934d312646638dd7091ba9.tar.xz
Allocate vo struct with talloc
Also allocate the private vo_xv struct as a child and remove explicit free() for it.
Diffstat (limited to 'libvo/vo_xv.c')
-rw-r--r--libvo/vo_xv.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libvo/vo_xv.c b/libvo/vo_xv.c
index 15aef38f63..eebfb66f89 100644
--- a/libvo/vo_xv.c
+++ b/libvo/vo_xv.c
@@ -23,6 +23,7 @@ Buffer allocation:
#include "config.h"
#include "options.h"
+#include "talloc.h"
#include "mp_msg.h"
#include "help_mp.h"
#include "video_out.h"
@@ -707,8 +708,6 @@ static void uninit(struct vo *vo)
mp_input_rm_event_fd(ConnectionNumber(mDisplay));
// uninit() shouldn't get called unless initialization went past vo_init()
vo_x11_uninit();
- free(ctx);
- vo->priv = NULL;
}
static void x11_fd_callback(void *ctx)
@@ -723,7 +722,7 @@ static int preinit(struct vo *vo, const char *arg)
unsigned int i;
strarg_t ck_src_arg = { 0, NULL };
strarg_t ck_method_arg = { 0, NULL };
- struct xvctx *ctx = calloc(1, sizeof *ctx);
+ struct xvctx *ctx = talloc_zero(vo, struct xvctx);
vo->priv = ctx;
opt_t subopts[] =