summaryrefslogtreecommitdiff
path: root/libavformat/mux.c
diff options
context:
space:
mode:
authorMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-06-23 22:02:31 +0200
committerMatthieu Bouron <matthieu.bouron@stupeflix.com>2016-06-23 22:02:31 +0200
commitb1e1da52fe2e7320363fdaa0cdd276847e25bf53 (patch)
tree626b8c306915e23a0daefb3e39f64beccd70675a /libavformat/mux.c
parent388f0957660027418ef931adaf21346e19ec2b67 (diff)
parente1eb0fc960163402bbb4e630185790488f7d28ed (diff)
Merge commit 'e1eb0fc960163402bbb4e630185790488f7d28ed'
* commit 'e1eb0fc960163402bbb4e630185790488f7d28ed': movenc: Use packets in interleaving queues for the duration at the end of fragments Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r--libavformat/mux.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c
index 8488043006..10b2750e3f 100644
--- a/libavformat/mux.c
+++ b/libavformat/mux.c
@@ -1041,6 +1041,17 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
}
}
+const AVPacket *ff_interleaved_peek(AVFormatContext *s, int stream)
+{
+ AVPacketList *pktl = s->internal->packet_buffer;
+ while (pktl) {
+ if (pktl->pkt.stream_index == stream)
+ return &pktl->pkt;
+ pktl = pktl->next;
+ }
+ return NULL;
+}
+
/**
* Interleave an AVPacket correctly so it can be muxed.
* @param out the interleaved packet will be output here