summaryrefslogtreecommitdiff
path: root/libavformat/utils.c
diff options
context:
space:
mode:
authorGavin Kinsey <gkinsey@ad-holdings.co.uk>2011-09-08 13:01:14 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-09-08 23:47:23 +0200
commitd64066f6e88c827e33002b2c7740efd62cd5ba7f (patch)
tree01d4db87987c16c4199936f23ca4a71a1e83d247 /libavformat/utils.c
parent5241bc2773c97d2b68763e046dd83ceb2b294b8b (diff)
Prevent double free of side_data when AVFMT_FLAG_KEEP_SIDE_DATA flag is set
Diffstat (limited to 'libavformat/utils.c')
-rw-r--r--libavformat/utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index d3a0d4a0c2..706c2b4932 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -1146,7 +1146,10 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
if (!st->need_parsing || !st->parser) {
/* no parsing needed: we just output the packet as is */
/* raw data support */
- *pkt = st->cur_pkt; st->cur_pkt.data= NULL;
+ *pkt = st->cur_pkt;
+ st->cur_pkt.data= NULL;
+ st->cur_pkt.side_data_elems = 0;
+ st->cur_pkt.side_data = NULL;
compute_pkt_fields(s, st, NULL, pkt);
s->cur_st = NULL;
if ((s->iformat->flags & AVFMT_GENERIC_INDEX) &&