[FFmpeg-cvslog] When copying pkt side_data, don't forget size, type
Andrey Utkin
git at videolan.org
Mon Sep 17 22:58:39 CEST 2012
ffmpeg | branch: master | Andrey Utkin <andrey.krieger.utkin at gmail.com> | Mon Sep 17 19:55:02 2012 +0300| [b0fabed20fd9cbdc96f36687b84ebe75941e32de] | committer: Michael Niedermayer
When copying pkt side_data, don't forget size, type
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b0fabed20fd9cbdc96f36687b84ebe75941e32de
---
libavcodec/avpacket.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index dbbba56..17c100e 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;
More information about the ffmpeg-cvslog
mailing list