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/rtsp.c | |
parent | b574fb472ed168f5a75cd981c98dd34cfe57ff3a (diff) | |
download | ffmpeg-a4798a5d5109cd9c1b5682efe19660e825da97e6.tar.gz |
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/rtsp.c')
-rw-r--r-- | libavformat/rtsp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index e6a4993acd..cd3d284da6 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -387,10 +387,9 @@ static void copy_default_source_addrs(struct RTSPSource **addrs, int count, int i; for (i = 0; i < count; i++) { rtsp_src = addrs[i]; - rtsp_src2 = av_malloc(sizeof(*rtsp_src2)); + rtsp_src2 = av_memdup(rtsp_src, sizeof(*rtsp_src)); if (!rtsp_src2) continue; - memcpy(rtsp_src2, rtsp_src, sizeof(*rtsp_src)); dynarray_add(dest, dest_count, rtsp_src2); } } |