summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-04-18 19:42:57 +0200
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>2018-04-21 22:59:34 +0200
commit8592ae1a1e4cd678c5a3418aab4f72029f0a8f38 (patch)
treec3dd3c9a8f0537e7f96dea0e04a7d852bdecb779
parentd865783b6c8d4f96f5094ed72eff0f5a4a4908af (diff)
lavf/dashdec: Do not use memcpy() to copy a struct.
Fixes a warning: libavformat/dashdec.c:1900:65: warning: argument to 'sizeof' in 'memcpy' call is the same pointer type 'struct fragment *' as the destination; expected 'struct fragment' or an explicit length
-rw-r--r--libavformat/dashdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c
index 6304ad933b..a2e2e13382 100644
--- a/libavformat/dashdec.c
+++ b/libavformat/dashdec.c
@@ -1897,7 +1897,7 @@ static int init_section_compare_audio(DASHContext *c)
static void copy_init_section(struct representation *rep_dest, struct representation *rep_src)
{
- memcpy(rep_dest->init_section, rep_src->init_section, sizeof(rep_src->init_section));
+ *rep_dest->init_section = *rep_src->init_section;
rep_dest->init_sec_buf = av_mallocz(rep_src->init_sec_buf_size);
memcpy(rep_dest->init_sec_buf, rep_src->init_sec_buf, rep_src->init_sec_data_len);
rep_dest->init_sec_buf_size = rep_src->init_sec_buf_size;