From 6f0b1866996097be25efc113fdc660f11886871e Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Thu, 12 Feb 2009 05:32:40 +0000 Subject: [PATCH] set last packet next pointer to null Originally committed as revision 17176 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mxfenc.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.11.0