Commit 4bab4235 authored by bcoudurier's avatar bcoudurier

set last packet next pointer to null

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@17176 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 58fa930f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment