From 65001aa93e8393c31c417b45761a318bc8cdd6ef Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 9 Aug 2022 14:25:55 +0200 Subject: fftools/ffmpeg: add a live mux mode Track the wallclock time at which each input packet is demuxed and propagate it through decoding and encoding. When the live mux option is used, drop all packets demuxed before the muxer is opened. This is intended to avoid latency when opening the muxer takes a long time. --- fftools/ffmpeg_demux.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fftools/ffmpeg_demux.c') diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index d15cee614d..01fd19f199 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -176,6 +176,8 @@ static void *input_thread(void *arg) } } + pkt->opaque = (void*)av_gettime_relative(); + msg.pkt = av_packet_alloc(); if (!msg.pkt) { av_packet_unref(pkt); -- cgit v1.2.3