From: Baptiste Coudurier Date: Thu, 12 Feb 2009 05:32:40 +0000 (+0000) Subject: set last packet next pointer to null X-Git-Tag: v0.5~578 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6f0b1866996097be25efc113fdc660f11886871e;p=coroid%2Fffmpeg_saccubus.git set last packet next pointer to null Originally committed as revision 17176 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index d60ffceee..833f53aef 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -1560,6 +1560,7 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket pktl = s->packet_buffer; if (s->nb_streams != stream_count) { AVPacketList *first = NULL; + AVPacketList *last = NULL; // find first packet in edit unit while (pktl) { AVStream *st = s->streams[pktl->pkt.stream_index]; @@ -1567,8 +1568,11 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket break; else if (!first) first = pktl; + last = pktl; pktl = pktl->next; } + if (last) + last->next = NULL; // purge packet queue while (pktl) { AVPacketList *next = pktl->next;