Revision 012dc2c4 libavformat/mxfenc.c
libavformat/mxfenc.c | ||
---|---|---|
1807 | 1807 |
|
1808 | 1808 |
static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket *pkt, int flush) |
1809 | 1809 |
{ |
1810 |
AVPacketList *pktl; |
|
1811 |
int stream_count = 0; |
|
1812 |
int streams[MAX_STREAMS]; |
|
1813 |
|
|
1814 |
memset(streams, 0, sizeof(streams)); |
|
1815 |
pktl = s->packet_buffer; |
|
1816 |
while (pktl) { |
|
1817 |
//av_log(s, AV_LOG_DEBUG, "show st:%d dts:%lld\n", pktl->pkt.stream_index, pktl->pkt.dts); |
|
1818 |
if (!streams[pktl->pkt.stream_index]) |
|
1819 |
stream_count++; |
|
1820 |
streams[pktl->pkt.stream_index]++; |
|
1821 |
pktl = pktl->next; |
|
1822 |
} |
|
1810 |
int i, stream_count = 0; |
|
1811 |
|
|
1812 |
for (i = 0; i < s->nb_streams; i++) |
|
1813 |
stream_count += !!s->streams[i]->last_in_packet_buffer; |
|
1823 | 1814 |
|
1824 | 1815 |
if (stream_count && (s->nb_streams == stream_count || flush)) { |
1825 |
pktl = s->packet_buffer; |
|
1816 |
AVPacketList *pktl = s->packet_buffer;
|
|
1826 | 1817 |
if (s->nb_streams != stream_count) { |
1827 | 1818 |
AVPacketList *last = NULL; |
1828 | 1819 |
// find last packet in edit unit |
Also available in: Unified diff