diff options
author | Janne Grunau <janne-libav@jannau.net> | 2013-03-12 22:16:45 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2013-03-13 11:34:47 +0100 |
commit | 91d4823f70baea6d72685c2954f39912d3f6ba93 (patch) | |
tree | 3d8e5074376562c6a309c5a19f7fbd1dea653f70 | |
parent | 5b3c1aecb253828d09fa9825c5a4aed97badf086 (diff) | |
download | ffmpeg-91d4823f70baea6d72685c2954f39912d3f6ba93.tar.gz |
avpacket: copy side data type and size in av_dup_packet
-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 c94f28272a..df88f3f186 100644 --- a/libavcodec/avpacket.c +++ b/libavcodec/avpacket.c @@ -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; |