summaryrefslogtreecommitdiffstats
path: root/demux/demux.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2018-01-18 10:08:48 +0100
committerKevin Mitchell <kevmitch@gmail.com>2018-01-18 01:42:36 -0800
commit6827901230a962ef40fbc18c6ab25d4d702b95aa (patch)
tree1c56f01ae57c3f1490bd3f79ed25daaafba15f43 /demux/demux.c
parent4d87c700e007d6fbff1d742c0e6e6700451172e2 (diff)
downloadmpv-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 'demux/demux.c')
-rw-r--r--demux/demux.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/demux/demux.c b/demux/demux.c
index 4ccb03a17d..d621b9d869 100644
--- a/demux/demux.c
+++ b/demux/demux.c
@@ -1811,7 +1811,7 @@ static struct replaygain_data *decode_rgain(struct mp_log *log,
rg.album_gain = rg.track_gain;
rg.album_peak = rg.track_peak;
}
- return talloc_memdup(NULL, &rg, sizeof(rg));
+ return talloc_dup(NULL, &rg);
}
if (decode_gain(log, tags, "REPLAYGAIN_GAIN", &rg.track_gain) >= 0 &&
@@ -1819,7 +1819,7 @@ static struct replaygain_data *decode_rgain(struct mp_log *log,
{
rg.album_gain = rg.track_gain;
rg.album_peak = rg.track_peak;
- return talloc_memdup(NULL, &rg, sizeof(rg));
+ return talloc_dup(NULL, &rg);
}
return NULL;