# HG changeset patch # User bcoudurier # Date 1234416760 0 # Node ID f21c01140f2d7d7c2eab8c6383b88b8c0d4cf0f4 # Parent 21945a5288cb69d1008de1e5b2b74fa6701d44f6 set last packet next pointer to null diff -r 21945a5288cb -r f21c01140f2d mxfenc.c --- a/mxfenc.c Thu Feb 12 03:38:08 2009 +0000 +++ b/mxfenc.c Thu Feb 12 05:32:40 2009 +0000 @@ -1560,6 +1560,7 @@ 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 @@ 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;