diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-11-27 10:50:47 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-03 16:07:02 +0100 |
commit | a4798a5d5109cd9c1b5682efe19660e825da97e6 (patch) | |
tree | c91e38e738cf12d468e06aaba77738173eed75e1 /libavformat/mpegts.c | |
parent | b574fb472ed168f5a75cd981c98dd34cfe57ff3a (diff) |
all: Use av_memdup() where appropriate
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r-- | libavformat/mpegts.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index 36ab7ab3af..2479cb6f7d 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -938,10 +938,9 @@ static int mpegts_set_stream_info(AVStream *st, PESContext *pes, // audio track - add a second stream for this AVStream *sub_st; // priv_data cannot be shared between streams - PESContext *sub_pes = av_malloc(sizeof(*sub_pes)); + PESContext *sub_pes = av_memdup(pes, sizeof(*sub_pes)); if (!sub_pes) return AVERROR(ENOMEM); - memcpy(sub_pes, pes, sizeof(*sub_pes)); sub_st = avformat_new_stream(pes->stream, NULL); if (!sub_st) { |