aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>2012-09-17 19:55:02 +0300
committerMichael Niedermayer <michaelni@gmx.at>2012-09-17 22:36:28 +0200
commitb0fabed20fd9cbdc96f36687b84ebe75941e32de (patch)
tree69fd25c028d1716bd79e8638149539e8d57374a6 /libavcodec
parent63951aec2b9d0f92f55c4229b9151d99026b82b6 (diff)
downloadffmpeg-b0fabed20fd9cbdc96f36687b84ebe75941e32de.tar.gz
When copying pkt side_data, don't forget size, type
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/avpacket.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index dbbba56ca7..17c100e577 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -144,9 +144,12 @@ int av_dup_packet(AVPacket *pkt)
pkt->side_data_elems * sizeof(*pkt->side_data), 0);
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);
+ pkt->side_data[i].size = tmp_pkt.side_data[i].size;
+ pkt->side_data[i].type = tmp_pkt.side_data[i].type;
+ }
}
}
return 0;