From cf3a1948e946ed7e98d0427da75e5dadb84aa51d Mon Sep 17 00:00:00 2001
From: Anton Khirnov <anton@khirnov.net>
Date: Sat, 2 Jun 2012 13:49:13 +0200
Subject: [PATCH] avpacket: fix duplicating side data.

Use correct side data size instead of just zeroed field.
---
 libavcodec/avpacket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 5e2292de284..4b85081e7b3 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -146,7 +146,7 @@ int av_dup_packet(AVPacket *pkt)
                    pkt->side_data_elems * sizeof(*pkt->side_data));
             for (i = 0; i < pkt->side_data_elems; i++)
                 DUP_DATA(pkt->side_data[i].data, tmp_pkt.side_data[i].data,
-                         pkt->side_data[i].size, 1);
+                         tmp_pkt.side_data[i].size, 1);
         }
     }
     return 0;
-- 
GitLab