diff options
author | wm4 <wm4@nowhere> | 2018-01-18 10:08:48 +0100 |
---|---|---|
committer | Kevin Mitchell <kevmitch@gmail.com> | 2018-01-18 01:42:36 -0800 |
commit | 6827901230a962ef40fbc18c6ab25d4d702b95aa (patch) | |
tree | 1c56f01ae57c3f1490bd3f79ed25daaafba15f43 /video | |
parent | 4d87c700e007d6fbff1d742c0e6e6700451172e2 (diff) | |
download | mpv-6827901230a962ef40fbc18c6ab25d4d702b95aa.tar.bz2 mpv-6827901230a962ef40fbc18c6ab25d4d702b95aa.tar.xz |
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.
Diffstat (limited to 'video')
-rw-r--r-- | video/out/vo.c | 4 |
1 files changed, 2 insertions, 2 deletions
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: |