1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-02-14 22:22:59 +02:00

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
This commit is contained in:
Carl Eugen Hoyos 2018-04-18 19:42:57 +02:00
parent d865783b6c
commit 8592ae1a1e

View 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) 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); 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); 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; rep_dest->init_sec_buf_size = rep_src->init_sec_buf_size;