From 662364b2efb3540c5b4a2b140601fab7a9c90367 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Thu, 31 Mar 2022 16:34:29 +0200 Subject: fftools/ffmpeg: stop using OutputStream.frame_number for streamcopy This field is currently used by checks - skipping packets before the first keyframe - skipping packets before start time to test whether any packets have been output already. But since frame_number is incremented after the bitstream filters are applied (which may involve delay), this use is incorrect. The keyframe check works around this by adding an extra flag, the start-time check does not. Simplify both checks by replacing the seen_kf flag with a flag tracking whether any packets have been output by do_streamcopy(). --- fftools/ffmpeg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fftools/ffmpeg.h') diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 1e14bf9fa9..04369df139 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -536,7 +536,7 @@ typedef struct OutputStream { int inputs_done; const char *attachment_filename; - int seen_kf; + int streamcopy_started; int copy_initial_nonkeyframes; int copy_prior_start; char *disposition; -- cgit v1.2.3