Prevent double free of side_data when AVFMT_FLAG_KEEP_SIDE_DATA flag is set

(cherry picked from commit d64066f6e8)
This commit is contained in:
Gavin Kinsey 2011-09-08 13:01:14 +01:00 committed by Michael Niedermayer
parent b2c9e9be87
commit e6df35b3be

View File

@ -1133,7 +1133,10 @@ static int av_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) &&