diff options
author | Andrey Utkin <andrey.krieger.utkin@gmail.com> | 2012-09-17 20:55:02 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-09-18 00:36:28 +0400 |
commit | b0fabed20fd9cbdc96f36687b84ebe75941e32de (patch) | |
tree | 69fd25c028d1716bd79e8638149539e8d57374a6 /libavcodec | |
parent | 63951aec2b9d0f92f55c4229b9151d99026b82b6 (diff) |
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.c | 5 |
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; |