[FFmpeg-cvslog] avpacket: copy side data type and size in av_dup_packet

Janne Grunau git at videolan.org
Thu Mar 14 11:56:28 CET 2013


ffmpeg | branch: master | Janne Grunau <janne-libav at jannau.net> | Tue Mar 12 22:16:45 2013 +0100| [91d4823f70baea6d72685c2954f39912d3f6ba93] | committer: Janne Grunau

avpacket: copy side data type and size in av_dup_packet

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=91d4823f70baea6d72685c2954f39912d3f6ba93
---

 libavcodec/avpacket.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index c94f282..df88f3f 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;



More information about the ffmpeg-cvslog mailing list