summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
Diffstat (limited to 'demux')
-rw-r--r--demux/demux.c4
-rw-r--r--demux/demux_mkv.c5
2 files changed, 4 insertions, 5 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;
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 6713a13db9..76fc70976f 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -1076,7 +1076,7 @@ static int demux_mkv_read_tags(demuxer_t *demuxer)
if (ebml_read_element(s, &parse_ctx, &tags, &ebml_tags_desc) < 0)
return -1;
- mkv_d->tags = talloc_memdup(mkv_d, &tags, sizeof(tags));
+ mkv_d->tags = talloc_dup(mkv_d, &tags);
talloc_steal(mkv_d->tags, parse_ctx.talloc_ctx);
return 0;
}
@@ -2758,8 +2758,7 @@ static int read_block_group(demuxer_t *demuxer, int64_t end,
&ebml_block_additions_desc) < 0)
return -1;
if (additions.n_block_more > 0) {
- block->additions =
- talloc_memdup(NULL, &additions, sizeof(additions));
+ block->additions = talloc_dup(NULL, &additions);
talloc_steal(block->additions, parse_ctx.talloc_ctx);
parse_ctx.talloc_ctx = NULL;
}