diff options
Diffstat (limited to 'libavformat/mux.c')
-rw-r--r-- | libavformat/mux.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavformat/mux.c b/libavformat/mux.c index 49fe65cf98..c41c477ab4 100644 --- a/libavformat/mux.c +++ b/libavformat/mux.c @@ -614,6 +614,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 |