From 371df9ba71393a1c5429d5f40c76348b30e556c7 Mon Sep 17 00:00:00 2001 From: Martin Storsjö Date: Wed, 4 May 2016 22:06:43 +0300 Subject: flvenc: Provide output bytestream markers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin Storsjö --- libavformat/flvenc.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'libavformat') diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c index 2dfe3ae867..00bd65cb58 100644 --- a/libavformat/flvenc.c +++ b/libavformat/flvenc.c @@ -21,6 +21,7 @@ #include "libavutil/dict.h" #include "libavutil/intfloat.h" +#include "libavutil/mathematics.h" #include "avc.h" #include "avformat.h" #include "flv.h" @@ -482,6 +483,9 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt) s->event_flags &= ~AVSTREAM_EVENT_FLAG_METADATA_UPDATED; } + avio_write_marker(pb, av_rescale(ts, AV_TIME_BASE, 1000), + pkt->flags & AV_PKT_FLAG_KEY && (flv->video_par ? par->codec_type == AVMEDIA_TYPE_VIDEO : 1) ? AVIO_DATA_MARKER_SYNC_POINT : AVIO_DATA_MARKER_BOUNDARY_POINT); + switch (par->codec_type) { case AVMEDIA_TYPE_VIDEO: avio_w8(pb, FLV_TAG_TYPE_VIDEO); -- cgit v1.2.3