From 6827901230a962ef40fbc18c6ab25d4d702b95aa Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Jan 2018 10:08:48 +0100 Subject: ta: introduce talloc_dup() and use it in some places It was actually already implemented as ta_dup_ptrtype(), but that seems like a clunky name. Also we still use the talloc_ names throughout the source, and I'd rather use an old name instead of a mixing inconsistent naming conventions. --- video/out/vo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video/out') diff --git a/video/out/vo.c b/video/out/vo.c index 0527d1364c..fa79d51739 100644 --- a/video/out/vo.c +++ b/video/out/vo.c @@ -574,7 +574,7 @@ static void run_reconfig(void *p) mp_image_params_get_dsize(params, &vo->dwidth, &vo->dheight); talloc_free(vo->params); - vo->params = talloc_memdup(vo, params, sizeof(*params)); + vo->params = talloc_dup(vo, params); *ret = vo->driver->reconfig(vo, vo->params); vo->config_ok = *ret >= 0; @@ -632,7 +632,7 @@ void vo_control_async(struct vo *vo, int request, void *data) switch (request) { case VOCTRL_UPDATE_PLAYBACK_STATE: - d[2] = ta_xdup_ptrtype(d, (struct voctrl_playback_state *)data); + d[2] = talloc_dup(d, (struct voctrl_playback_state *)data); break; case VOCTRL_KILL_SCREENSAVER: case VOCTRL_RESTORE_SCREENSAVER: -- cgit v1.2.3