1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avpacket: copy side data type and size in av_dup_packet

This commit is contained in:
Janne Grunau 2013-03-12 22:16:45 +01:00
parent 5b3c1aecb2
commit 91d4823f70

View File

@ -193,9 +193,12 @@ int av_dup_packet(AVPacket *pkt)
pkt->side_data_elems * sizeof(*pkt->side_data), 0, ALLOC_MALLOC);
memset(pkt->side_data, 0,
pkt->side_data_elems * sizeof(*pkt->side_data));
for (i = 0; i < pkt->side_data_elems; i++)
for (i = 0; i < pkt->side_data_elems; i++) {
DUP_DATA(pkt->side_data[i].data, tmp_pkt.side_data[i].data,
tmp_pkt.side_data[i].size, 1, ALLOC_MALLOC);
pkt->side_data[i].size = tmp_pkt.side_data[i].size;
pkt->side_data[i].type = tmp_pkt.side_data[i].type;
}
}
}
return 0;