|
|
@ -1560,6 +1560,7 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket |
|
|
|
pktl = s->packet_buffer; |
|
|
|
pktl = s->packet_buffer; |
|
|
|
if (s->nb_streams != stream_count) { |
|
|
|
if (s->nb_streams != stream_count) { |
|
|
|
AVPacketList *first = NULL; |
|
|
|
AVPacketList *first = NULL; |
|
|
|
|
|
|
|
AVPacketList *last = NULL; |
|
|
|
// find first packet in edit unit
|
|
|
|
// find first packet in edit unit
|
|
|
|
while (pktl) { |
|
|
|
while (pktl) { |
|
|
|
AVStream *st = s->streams[pktl->pkt.stream_index]; |
|
|
|
AVStream *st = s->streams[pktl->pkt.stream_index]; |
|
|
@ -1567,8 +1568,11 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket |
|
|
|
break; |
|
|
|
break; |
|
|
|
else if (!first) |
|
|
|
else if (!first) |
|
|
|
first = pktl; |
|
|
|
first = pktl; |
|
|
|
|
|
|
|
last = pktl; |
|
|
|
pktl = pktl->next; |
|
|
|
pktl = pktl->next; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (last) |
|
|
|
|
|
|
|
last->next = NULL; |
|
|
|
// purge packet queue
|
|
|
|
// purge packet queue
|
|
|
|
while (pktl) { |
|
|
|
while (pktl) { |
|
|
|
AVPacketList *next = pktl->next; |
|
|
|
AVPacketList *next = pktl->next; |
|
|
|