]> git.sesse.net Git - ffmpeg/commitdiff
lavf/dashdec: Do not use memcpy() to copy a struct.
authorCarl Eugen Hoyos <ceffmpeg@gmail.com>
Wed, 18 Apr 2018 17:42:57 +0000 (19:42 +0200)
committerCarl Eugen Hoyos <ceffmpeg@gmail.com>
Sat, 21 Apr 2018 20:59:34 +0000 (22:59 +0200)
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

libavformat/dashdec.c

index 6304ad933bb947dfae2008788335e62fb0179ed4..a2e2e13382b19d01fd55f06ad7d68f9cdae3f5ee 100644 (file)
@@ -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;